Skip to content

Creating mysql database and granting user access

May 23, 2010

$ mysql -u root -p
Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.22.32

Type ‘help’ for help.

mysql>

mysql> create database dbname;
Query OK, 1 row affected (0.00 sec)

mysql>show databases;

mysql> GRANT ALL ON dbname.* TO username@localhost IDENTIFIED BY “password”;
Query OK, 0 rows affected (0.00 sec)

Advertisement

From → Linux, mysql

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.