用户工具


导出数据库

mysqldump -u root -p mantis>mantis.sql 

还原数据库

mysql>source mantis.sql; 

新建数据库

CREATE DATABASE IF NOT EXISTS mantis default charset utf8 COLLATE utf8_general_ci; 

强制本地登录时使用密码

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;

允许异地用密码登录

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;