Mysql Command

Mysql Command


导出库:
mysqldump --login-path=root --single-transaction --default-character-set=utf8mb4 stargame_imge > /storage/stargame_imge_superb888.sql

导出库不包含数据:
mysqldump --login-path=root --single-transaction --default-character-set=utf8mb4 -d stargame_imge > /storage/stargame_imge_superb888.sql

导出表:
mysqldump --login-path=root --single-transaction scr8 game_asc_team_reference > /storage/game_asc_team_reference180524.sql

建库:
CREATE DATABASE stargame_imge_superb888 CHARACTER SET utf8mb4;

导入:
mysql --login-path=root stargame_imge_superb888 /storage/phone_filter1104.sql



CREATE DATABASE phone_filter;

GRANT ALL ON phone_filter.* TO 'phone_filter'@'%' identified by '42432432423423';

mysql --login-path=root phone_filter < /storage/phone_filter1104.sql

select TABLE_SCHEMA,TABLE_NAME,TABLE_ROWS from TABLES where TABLE_SCHEMA='phone_filter';

你可能感兴趣的