Networking HowTos
Networking HowTos

Create a new database in MySQL

January 1, 2013 Database, MySQL

This howto will outline the steps to create a new blank MySQL database.
Run the MySQL client:

$ mysql -u root -p

You will be asked for a password. If you don’t have a password set, simply press enter when prompted.
Run the following command to create a new database:

CREATE DATABASE <database name>;

Replace <database name> with the name of the database you wish to create.
eg:

CREATE DATABASE websitedev;

Remember to set up user permissions on the newly created database. See ‘Grant a MySQL user access to a database‘ for more details.
Exit the MySQL client:

exit

You Might Also Like