The database MySql database command base

Continue on to the blog post said, using the command Fun MySql database.

When connecting to the database, we need to determine where the database server IP, user name and password. Of course, we will use a local general practice database, then connect the local database command is as follows:

mysql -uroot -p

When we successfully connect to the database, first look at what are the current database:

show databases;

Create a database, and set the character set encoding to UTF-8, the command is as follows:

create database python charset=utf8;

When the database is successfully created, you need to tell this brother, I want to use you, then command is:

use python;

When this code is executed, it said that it has successfully switched the database, then we can be happy to play up.

 

 

 

 

Guess you like

Origin www.cnblogs.com/chao666/p/12032651.html