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/stargame_imge_superb888.sql

创建用户:
GRANT ALL ON stargame_imge_superb888.* TO 'stargame_imge_superb888'@'%' identified by '12345624324';


Innodb:
mysqldump --login-path=root -S /storage/mysql/data/mysql.sock  --single-transaction  phone_filter  > /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';

芒果牛奶
1 声望0 粉丝

运维背锅之路


下一篇 »
Redis Cluster