First, the new database
1, check mysql
Prior to the new database, check whether the database is installed, this time we are using the mysql database to check whether the installation mysql mysql --version can be used directly;
Displays the version of mysql information indicates the installation was successful, without prompting version information, please install mysql
2, enter mysql
Enter "mysql -uroot -p"
The future will be prompted for a password, enter a password, enter into mysq
3. Create a database
The name of the database we created called "test_demo", encoding settings and database to utf8, note that the last command must remember to bring ";" number, which is specified mysql syntax
In this way, the database will create a success
4, into the database
The use command, plus the name of the database, enter the database