mysql
1.
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
解答:
mysql>show variables like ‘datadir%’;
mysql>show variables like '%secure%'; 命令显示文件目录whereis my //my: /etc/my.cnf
vim /etc/my.cnf
[mysqld]节点 下添加 secure_file_priv='',然后重启mysql服务。
2.
当你修改好root密码后,很有可能出现这种情况
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
解答:
whereis my //my: /etc/my.cnf
vim /etc/my.cnf
在[mysqld]后面任意一行添加“skip-grant-tables”用来跳过密码验证的过程。
service mysqld restart
登录mysql系统
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
mysql> flush privileges;
mysql> exit;
3.
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
解答:
1)create user 'wli'@'%' identified by '123456';
2)flush privileges;
3)create user 'wli'@'%' identified by '123456';
就OK了。报错不要管,直接运行下面一句。