MySQL设置远程客户端访问权限和修改账户密码
11.给mysql指定数据库分配用户及权限。
grant select,insert,update,delete on C.* to mpp@localhost identified by "123456"; |
|
12.生效远程连接mysql
- mysql>GRANT ALL PRIVILEGES ON C.* TO 'root'@'%' identified by "123456";
- mysql>GRANT ALL PRIVILEGES ON C.* TO 'root'@localhost identified by "123456";
- //赋予任何主机访问数据的权限
- mysql>FLUSH PRIVILEGES
- //修改生效
14.撤销权限
revoke all on C.* from 'root'@localhost identified by '123456';
13.MySQL修改账户密码
use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
http://www.orczhou.com/index.php/2010/09/mysql-too-many-connections/(修改状态)
MySQL报错:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
解决办法:
mysql> set global read_only=0;
(关掉新主库的只读属性)
flush privileges;