1. See what databases are in the current server
2. See what tables are in the MySQL database
3. View the structure of the Users table
4. Create a new database auth and tables users
5. Delete the users table and the AUTH database
6. Inserting data
7. Querying data
Delete and change the statement and SQL Server statement exactly the same, can refer to SQL Server statement, here no longer detailed demonstration
8, the user authorization of the database
1) Create a new user Xiaoqi and give the SELECT permission to all tables in the AUTH database
2) Log in to the server using Xiaoqi
BR/>3) Create a new database BDQN, and authorize the host connection from the IP address 192.168.4.19, the user name is Dbuser, the password is [email protected], allowing any action to be taken in the BDQN database
4) View Permissions
Show grants for ' dbuser ' @ ' 192.168.4.19 '
5) Revoke Permissions
First look at the permissions that are already available
EXECUTE command REVOKE permission revoke all on auth.* from ' xiaoqi ' @ ' localhost '
View Permissions again
9. Backup and Recovery of database
Backing up tables, backing up libraries, backing up all libraries
10. Delete the table users and then restore
View table has been restored
11. If the backup file already includes complete database information, you do not need to specify the library name when performing the import operation, for example: Recovering the Auth Library from the backup file Auth.sql
First enter the database storage directory: Cd/usr/local/mysql/data, then execute the command
MySQL Database basic commands