Log on to the database
Input in the "command prompt character" window,
Enter cd C: mysqlbin and press the Enter key to switch the directory to cd C: mysqlbin.
Enter the mysql-uroot-p command and press enter to prompt you to enter the password. If MYSQL is just installed, the Super User root has no password, so press enter to enter MYSQL, MYSQL prompt: mysql> Change Password
C: input at mysqlbin prompt:
Format: mysqladmin-u username-p old password New password
For example, add a password ab12 to the root user. Type the following command:
Mysqladmin-uroot password ab12
Create a database
Format: create database name;
For example, create a new database named shopex.
At the MYSQL prompt: mysql> enter create database shopex;
Show Database
Format: show databases;
Note that it is databases instead of database.
Create a new user
Format: grant all privileges on database. * to username @ login host identified by "password ";
For example, add a user named test with a password of 1234 so that he can only log on to localhost and perform all operations on the database Shopex (localhost refers to the local host, that is, the host where the MYSQL database is located.) At the MYSQL prompt: mysql> enter grant all privileges on shopex. * to test @ localhost identified by "1234 ";
Through the above operations, you create a new database named shopex and add a database named test with all operation permissions on the shopex database.
Note: The preceding is just a simple Mysql Operation Command. For more details, see the Mysql operation instructions.