赞
踩
1.登录Mysql
[root@xufeng Desktop]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
2.添加新的用户
允许本地 IP访问localhost的Mysql数据库
mysql> create user 'editest'@'localhost' identified by 'editest123456';
Query OK, 0 rows affected (0.06 sec)
允许外网IP访问数据库editest,本命令包含上面的命令,是所有的IP都可以访问该数据库
mysql> create user 'editest'@'%' identified by 'editest123456';
Query OK, 0 rows affected (0.00 sec)
用户创建完成后,刷新授权
mysql> flush privileges;
Query OK, 0 rows affected (0.00
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。