1.https://blog.51cto.com/10814168/2402109
2.然后使用以下命令修改用户名密码 及其外网访问权限。需要用哪个就用哪个,记录的比较乱。
ALTER USER 'root'@'%' IDENTIFIED BY 'jxxt1234';
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');
update mysql.user set password=password('root') where user='root' and host='localhost';
FLUSH PRIVILEGES;
grant all privileges on *.* to root@'%' identified by "root";
-- 创建数据库
CREATE DATABASE wmdl DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER DATABASE wmdl DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
-- 创建用户
grant all privileges on wmdl.* to wmdl_test@"%" identified by "xxxxx";
update user set Super_priv='Y' where User='wmdl_test';
发表评论: