windwow mysql远程访问
http://t.zoukankan.com/tenghoo-p-mysql_grant.html
1、mysql -u root -p
2、use mysql
3、GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
4、flush privileges;
5、select host,user from user;
1、创建数据库:
create database 数据库名(例:mask);
2、创建用户:
create user ‘用户名‘@’localhost’ identified by ‘用户密码’;
create user ‘用户名‘@’%’ identified by ‘用户密码’;
备注:localhost本机ip,%任何ip
3、配置权限:
grant all privileges on 数据库名.* to 用户名@’%’ identified by ‘用户密码’;
可使用navicat测试登录。
文档更新时间: 2022-04-09 15:59 作者:admin