常用指令
# 授权 grant select,insert,update,delete on db_name.* to db_user@'127.0.0.1' identified by 'your_password'; grant all privileges on db_name.* to db_user@'localhost' identified by 'your_password'; flush privileges; # dump and load .sql file mysqldump [--no-data] -u root -p db_name [table_name, table_name2, ...] > your_dump_file.sql mysql>source your_dump_file_path; # 看数据库里,行数最多的表 use information_schema; select TABLE_NAME, TABLE_ROWS from TABLES order by TABLE_ROWS desc limit 20;