标签:statement option color ges with ant mysq class 用户
在进入mysql之后,输入相应的语句:
GRANT ALL PRIVILEGES ON *.* TO ‘myuser‘@‘%‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION; 其中‘myuser‘、‘mypassword‘ 需要替换成实际的用户名和密码。 例如GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘admin‘ WITH GRANT OPTION;
可能会报错,如下:
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
改正:
mysql> set password=password(‘admin‘); Query OK, 0 rows affected, 1 warning (0.01 sec) mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘admin‘ WITH GRANT OPTION; FLUSH PRIVILEGES; Query OK, 0 rows affected, 1 warning (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> quit; Bye
成功修改
标签:statement option color ges with ant mysq class 用户
原文地址:http://www.cnblogs.com/mswangblog/p/6796400.html