How to create database on MySQLFollow @ggarron
I have been working with MySQL databases a little bit these days.
I will write and share some small tips for the beginners the following weeks.
Today, we’ll see how to create a Database.
Get MySQL prompt
mysql -u root -p
You will be asked the root password, and then you will get access to the MySQL prompt. At the prompt run:
create database myfirstdatabase;
Now root, needs to grant permissions to other user, so the database can be manages by another user that is not root.
GRANT ALL ON myfirstdatabase.* TO user1@localhost IDENTIFIED BY "some_pass"
Thanks to Darren
Ok, you can now leavy the MySQL environment,
You are done.