How do I create a new MySQL database for a user?

1) Create the database:

mysql> CREATE DATABASE fruit;
Query OK, 1 row affected (0.08 sec)
How do I create a normal MySQL user?

2) Create the user account:

mysql> GRANT ALL PRIVILEGES ON fruit.* TO 'bob'@'localhost' IDENTIFIED BY 'toughpassword' ;

3) Flush the privileges:

mysql> FLUSH PRIVILEGES;
Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *