mySQL的报错解决

mySQL的报错解决,第1张

1.Starting MySQL.Manager of pid-file quit without updating fi[失败]

关于这个错误原因有很多,最大的可能是没有创建测试数据库,可以用/usr/local/mysql/scripts/mysql_install_db –user=mysql命令进行创建;另外一个原因可能是权限设置问题,需要赋予mysql的data权限,可以用chmod -R 命令。

2.FATAL ERROR: Could not find /home/mysql/bin/my_print_defaults If you are using a binary release,you must run this script from

within the directory the archive extracted into. If you compiled

MySQL yourself you must run ‘make install’ first.

这个错误,是没有指明mysql的data路径导致的,可以很简单的进行解决:

vim /etc/my.cnf

在[mysqld] 后面加上路径:

basedir = /usr/local/mysql

datadir =/opt/data;

3.-bash: mysql: command not found

用mysql命令进行登陆mysql报错,原因是没有设置环境变量,需要设置,或者进入到bin目录进行登陆cd /usr/local/mysql/bin

mysql -u root

4.ERROR 1130: Host ’192.168.1.3′ is not allowed to connect to this MySQL server

用mysql远程工具链接数据库报错,这个错误原因是没有开放远程链接功能,可以在mysql里面输入如下命令进行解决:GRANT ALL PRIVILEGES ON *.* TO ’root‘@’%' IDENTIFIED BY ’password’ WITH GRANT OPTION

mysql启动报错: Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.[FAILED] 编辑mysql配置文件 vi /etc/my.conf 最后一行加sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION source /etc/my.conf 再次启动 service myslqd start


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/7674874.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-08
下一篇 2023-04-08

发表评论

登录后才能评论

评论列表(0条)

保存