The second day of javaweb video (three) (database) (my database is not utf8 by default)

 

 

Add password after -p

 

 

 Before using the database, first open the database

Here, pay attention to the name of your database

MYSQL57 instead of ordinary MYSQL

 

 Must be opened as an administrator.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 As long as it is a relational database, you can use sql to operate, all relational types can use this.

 

The operation of different databases is called "dialect"

The sql statement ends with a semicolon.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 Must add s

IF NOT EXISTS on the basis of the database does not exist, and then create a database

 

 

 Default character set database

 

 

 

 

 

 

 Now I know that the database

CRUD

SHOW CREATE DATABASE MYSQL;

CREATE DATABASE XX  CHARACTER SET ;

DROP DATABASE IF   EXISTS db1;

ALTER DATABASE dbxx CHARACTER SET gbk;

USE XXX;

Select database();

Which database is currently selected.

 

 

 

 

 Said is the operation of the database level, is the operation of the library!

 

Guess you like

Origin www.cnblogs.com/startFrom0/p/12692991.html
Recommended