This article for you to share two kinds of MySQL to create a database method for your reference, the specific content as follows
The first method: using Mysqladmin to create a database
with ordinary users, you may need specific permissions to create or delete MySQL databases.
So we're logged in with the root user and the root user has the highest privileges and can use the MySQL mysqladmin command to create the database.
Instance
The following command briefly demonstrates the process of creating a database named Tutorials:
[root@host]# mysqladmin-u root-p Create tutorials
Enter password:******
The MySQL database tutorials is created after the above command has been successfully executed.
The second method: Creating a database using PHP scripts
PHP uses the mysql_query function to create or delete MySQL databases.
The function has two parameters that return TRUE if the execution succeeds, or FALSE.
Syntax:bool mysql_query (SQL, connection);
Instance
The following example demonstrates the use of PHP to create a database:
The above is MySQL to create a database of two methods, I hope to help you learn, but also hope that we support the cloud habitat community.