MySQL User management
A new user who creates a specified IP can access some of the MySQL library's tables
. All tables for all libraries, if you want to specify access to certain tables of a library, you only need to modify the name
User1 specified user name br/>@ the IP that follows is the specified ip,% represents all IP
Verify login with User user1
You can also specify localhost,
You can access it without entering the native IP address at logon
View authorization to authorize new users, new permissions;
Common SQL statements
To view the number of rows in a library table
Search: Select count () from Mysql.user;
Search: Select db from Mysql.db;
Select Db,user from Mysql.db;
Fuzzy search Query Select from mysql.db where host like ' 192.168.% ';
Insert: INSERT INTO DB1.T1 values (1, ' abc ');
Updated: Update db1.t1 set name= ' AAA ' where id=1;
Delete
Re-insert
Empty, empty content only, do not clear table structure
TRUNCATE TABLE db1.t1;
drop table db1.t1;
Drop database db1;
MySQL Database backup recovery
Start with a library to a directory, create a new library, and restore from the catalog to the new library
Backup table
Recovery table
Back Up all libraries
Back up table structure only
MySQL user management, common SQL statements, MySQL database backup recovery