Create a database:
To create a statement of the type of database, enter CREATE DATABASE database name;
Note: The command does not have to be entered in UPPERCASE.
Note: All MySQL command must be ";" end. If you forget the semicolon, you can enter the next line ";" Let the previous command is processed.
Display a list of available databases:
Enter the command SHOW DATABASES; lists all the saved database.
In addition to the database you created, you will see a mysql database and a test database (default database).
MYSQL Error Code Summary
1005: Creating table failed
1006: Failed to create database
1007: database already exists, create a database failure
1008: The database does not exist, delete the database failed
1009: You can not delete the database files to delete the database led to failure
1010: You can not delete the data directory database failure led to delete
1011: delete a database file failed
1012: The system can not read the record in the table
1020: record has been modified by other users
1021: Hard disk free space is insufficient, please increase the available hard disk space
1022: duplicate keywords, changes fail
1023: An error occurred during shutdown
1024: Error reading file
1025: An error occurred while changes name
1026: Error writing file
1032: Record does not exist
1036: the data table is read-only, it can not be modified
1037: Insufficient system memory, restart or reboot the server database
1038: Out of memory for sorting, increase the sort buffers
1040: *** number of connections has reached the database, increase the number of available connections to the database
1041: Out of system memory
1042: Invalid hostname
1043: Invalid connection
1044: The current user does not have access to the database
1045: Can not connect to the database, user name or password is incorrect
1048: Field can not be empty
1049: The database does not exist
1050: data table already exists
1051: data table does not exist
1054: Field does not exist
1065: Invalid SQL statements, SQL statement is empty
1081: Socket connection could not be established
1114: data table is full, the recording can not accommodate any
1116: Too many open data tables
1129: The database appears abnormal, please restart the database
1130: Failed connect to the database, the database is not connected rights
1133: The database user does not exist
1141: The current user is not authorized to access the database
1142: The current user is not authorized to access the data table
1143: The current user does not have access to the data fields in the table
1146: data table does not exist
1147: Not defined user access to data table
1149: SQL statement syntax error
1158: network error, read error occurs, check the network connection status
1159: network error, reading timeout, please check your network connection status
1160: network error, write error occurs, check the network connection status
1161: network error, write timeout, please check your network connection status
1062: duplicate field values, storage failure
1169: duplicate field value, update record failure
1177: Failed to open the data table
1180: Failed to commit the transaction
1181: roll back the transaction fails
1203: The current user and database connection established connections database *** has been reached, increase the number of database connections available or restart the database
1205: Lock Timeout
1211: The current user does not have permission to create a user
1216: foreign key constraint check fails, a failure to update child records
1217: foreign key constraint check fails, delete or modify the main record table failed
1226: The current resource users has exceeded the allowed resources, please restart the database or restart the server
1227: insufficient rights, you have no right to do this
1