Mysql (2) Database Operations Mysql database operations mysql-u username-p password to log on to the mysql database. 1. display the existing database command: show databases; used to display the information of the created database. Command: show databases [LIKE char] This command indicates that the database is displayed and matches the subsequent characters. If [LIKE char] is used, the char string can be a string that uses the "%" and "_" wildcards of mysql. For example, show databases like 'My % '; this indicates that the database name starts with' %. Www.2cto.com 2. create database Command: create database dbname; this statement is used to CREATE a DATABASE named dbname. If the database name already exists, an error is returned. 3. Run the drop database [if exists] dbname command to delete a DATABASE named dbname. Use it with caution. [If exists] is used to prevent the deletion operation because the table does not exist. 4. Select the database command: USE dbname; the function of this statement is to select a database named dbname.