• 今天重启一台内网服务器,发现mysql无法正常重启,执行systemctl start mysql,报错如下
    Starting LSB: start and stop MySQL...
Dec 11 14:24:42 localhost.localdomain mysql[32329]: my_print_defaults: [Warning] World-writable config file '/etc/my.cnf' is ignored.
Dec 11 14:24:42 localhost.localdomain mysql[32329]: Starting MySQL.my_print_defaults: [Warning] World-writable config file '/etc/my.cnf' is ignored.
Dec 11 14:24:42 localhost.localdomain mysql[32329]: my_print_defaults: [Warning] World-writable config file '/etc/my.cnf' is ignored.
Dec 11 14:24:42 localhost.localdomain mysql[32329]: Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
Dec 11 14:24:43 localhost.localdomain mysql[32329]: ERROR! The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).
Dec 11 14:24:43 localhost.localdomain systemd[1]: mysql.service: control process exited, code=exited status=1
  • 刚开始关注点放在了 ERROR! The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid). 这里,发现mysql下没有data这个文件夹,以为数据库文件丢失了呢,头疼。

  • 后来将关注点放到 my_print_defaults: [Warning] World-writable config file '/etc/my.cnf' is ignored.

    • 查看my.cnf的权限,
    • ls -l /etc/my.cnf
    • -rwxrwxrwx 1 root root 1404 Oct 16 19:31 /etc/my.cnf , 发现是777权限
    • chmod 644 /etc/my.cnf , 设置为644权限
    • systemctl start mysql , 一切OK
  • 另外,发现无法远程连接,之前设置过IP,用户访问权限,但还是重新设置了一遍,并开放端口3306,才可以远程连接(由于设置权限和开放端口没有分开执行,所以并未确定是端口还是权限造成的)。

    GRANT ALL PRIVILEGES ON *.* TO 'username '@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

    FLUSH   PRIVILEGES;

    iptables -I INPUT -p tcp --dport 3306-j ACCEPT

    远程连接成功

MySQL无法启动问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored的更多相关文章

  1. MySQL无法重启问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored

    MySQL无法重启问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored

  2. MySQL无法重启问题解决Warning: World-writable config file ‘/etc/mysql/my.cnf’ is ignored

    今天在修改mysql数据库的配置文件,由于方便操作,就将“/etc/mysql/my.cnf” 的权限设置成 “777” 了,然后进行修改,当修改完进行重启mysql的时候,却报错,提示Warning ...

  3. Warning: World-writable config file '/etc/my.cnf' is ignored

    1. 问题描述: 重启mysql服务时出现以下信息: Warning: World-writable config file '/etc/my.cnf' is ignored 出现这种情况的原因是:m ...

  4. mysql 帮助手册 以及 warning: World-writable config file 以及 ERROR 1840 (HY000) at line 24:

    1. mysql --help 2.报错 报错Warning: World-writable config file http://www.jb51.net/article/99027.htm 最近在 ...

  5. mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解决方法

    出现问题的可能性 1.可能是/opt/mysql/data/数据目录mysql用户没有权限(修改数据目录的权限) 解决方法 :给予权限,执行  "chown -R mysql.mysql / ...

  6. mysql无法启动

    当在安装mysql服务时,有时会遇到恶心的PID错误而导致安装后无法启动以下为针对mysql-5.5版本在安装mysql时所遇到的问题的解决方法. 1.可能是/usr/local/mysql/data ...

  7. 启动MySql提示:The server quit without updating PID file(…)失败

    1.可能是/usr/local/mysql/data/rekfan.pid文件没有写的权限解决方法 :给予权限,执行 "chown -R mysql:mysql /var/data" ...

  8. MySql提示:The server quit without updating PID file(…)失败

    一般有一下集中可能 1.可能是/usr/local/mysql/data/rekfan.pid文件没有写的权限解决方法 :给予权限,执行 "chown -R mysql:mysql /var ...

  9. MySQL提示:The server quit without updating PID file问题的解决办法(转载)

    MySQL提示:The server quit without updating PID file问题的解决办法 今天网站web页面提交内容到数据库,发现出错了,一直提交不了,数找了下原因,发现数据写 ...

随机推荐

  1. java中快速读写图片到BufferedImage对象

    java7读取文件到BufferedImage对象 BufferedImage bufferedImage = ImageIO.read(Files.newInputStream(Paths.get( ...

  2. tensorflow学习 从入门到实战(转)

    原文作者:zhaozhengcoder链接:https://www.jianshu.com/p/27a2fb320934來源:简书简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处. ...

  3. SecureCRT 8.1破解方式

    百度网盘下载,里面有破解程序和破解方式. 链接: https://pan.baidu.com/s/1wlhqnn-TE_mcOXOLljP-zg 密码: 3ffj

  4. 【笔记】Docker部署Nginx,并修改配置文件

    先来一个删除命令:) root@fudonghai:~# rm -rf /usr/docker/nginx/{conf.d,html,log} root@fudonghai:~# rm -r /usr ...

  5. vue的依赖注入provide和inject

    一.解决的场景问题: 根父组件A有一个方法getMap,该组件A下的所有子组件B,子组件C,子组件D,或者子组件B下的子组件E等层层嵌套情况下,在某种情况下,都需要访问父组件的getMap方法,那么常 ...

  6. 综合练习1,划分vlan,单臂路由,DHCP服务及其限制网段、租期,设置根桥,OSPF路由通告综合练习

    实验要求: 1.在LSW1上分别给vlan10和vlan20做DHCP网段分别为192.168.10.0/24.192.168.20.0/24禁用192.168.10.200-253,192.168. ...

  7. Postman 下载和使用

    Postman 的官网下载地址是:https://www.getpostman.com/apps/

  8. python函数声明和调用(18)

    函数是指代码片段,可以重复调用,比如我们前面文章接触到的type()/len()等等都是函数,这些函数是python的内置函数,python底层封装后用于实现某些功能. 一.函数的定义 在Python ...

  9. Java面试 - PATH与CLASSPATH 的区别?

    PATH:操作系统提供的路径配置,用于定义所有可执行程序的路径. CLASSPATH:由JRE提供的,用于定义Java 程序解释时类加载路径.

  10. Python练手项目:20行爬取全王者全英雄皮肤

    引言    王者荣耀大家都玩过吧,没玩过的也应该听说过,作为时下最火的手机MOBA游戏,咳咳,好像跑题了.我们今天的重点是爬取王者荣耀所有英雄的所有皮肤,而且仅仅使用20行Python代码即可完成. ...