Creating database and Users

For creating a database table in Mysql, use the following command as :

CREATE DATABASE publications;

After verifying uniqueness for database name, MySql engine flashes a message of : database created

Creating users

Now that you’ve seen how easy it is to use MySQL, and created your first database, it’s time to look at how you create users, as you probably won’t want to grant your PHP scripts root access to MySQL—it could cause a real headache should you get hacked. To create a user, issue the GRANT command, which takes the following form (don’t type this in—it’s not an actual working command):

GRANT ALL ON publications.* TO 'jim' IDENTIFIED BY 'mypasswd';

You may also like...