1. View database version information
Mysql> select version ();
2. View the database currently in use
Mysql> Select Database ();
3. View current logged in user
Mysql> Select User (), or Mysql>select current_user ();
4. See the current date, time, or time date
Mysql> select Curdate ();
Mysql> select Curtime ();
Mysql> Select Now ();
5. View the build statement, where Zabbix is the database name
Mysql> Show CREATE Database Zabbix;
6. View Character Set
Mysql> Show variables like "char%";
7. View the database engine, default to InnoDB
Mysql> show engines;
8. Set character Sets
mysql> set names UTF8;
9, the establishment of the database, where if not exists is determined that the database does not exist, if not exist, the creation of the presence of a warning message, but no error
Mysql> CREATE database if not EXISTS DB default character set UTF8;
10. Delete Database
mysql> drop Database DB;
Small question: How do I create a database named "Databases"?
MySQL build database and common functions