mysql命令备份

CREATE DATABASE IF NOT EXISTS codex_gm DEFAULT CHARACTER SET utf8;

service mysqld stop

 

screen -dmS mysqldsafe mysqld_safe --skip-grant-tables

 

mysql -uroot

 

screen -dmS LOLGameServer ./run.sh

 

screen -list

 

screen -r 432144

 

screen -dmS XDBAgent ./XDBAgent

 

screen list

 

screen -list

 

screen -dmS WorldServer ./WorldServer

 

screen -dmS PassportServer ./PassportServer

 

screen -dmS GameServer ./GameServer

 

screen -dmS CharServer ./CharServer

 

 

 

 

 

创建mysql库,并导入sql数据

 

create database if not exists  ry_vue default character set utf8;

mysql -uroot -e "show databases; create database if not exists  ry_vue default character set utf8; "

mysql -uroot -e "show databases; use ry_vue;  source /sql/ry_20230706.sql ;"

mysql -uroot -e "show databases; use ry_vue; show tables; "

 

若出现中文乱码,在导入sql文件第一行前加入以下行,再重新建库、导表。

/*!40101 SET NAMES utf8 */;

 

posted @ 2017-12-15 06:56  会飞的斧头  阅读(158)  评论(0编辑  收藏  举报