Create A Database
- The command to create a database is
CREATE DATABASE name
- Unlike SQL keywords, database names are case sensitive.
- An user must have privileges to create a database.
- Otherwise, an access denied when creating a database error will occur.
- The system administrator can grant these privileges.
- For example:
mysql> GRANT ALL ON database.* TO 'mysql_user'@'hostname';
- A database needs to be created only once, but it must selected for use with each
mysql session.
How do I create a table?
© 2007 John Michael Pierobon
Notes