• 今天重启一台内网服务器,发现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. iOS技术面试08:其他

    1 客户端安全性处理方式? 1> 网络数据传输(敏感数据[账号\密码\消费数据\银行卡账号], 不能明文发送) 2> 协议的问题(自定义协议, 游戏代练) 3> 本地文件存储(游戏的 ...

  2. maven执行过程中抛出的各类异常信息

    价值 各类异常信息分类 举例 maven源代码的模块maven-core里的各类*Exception命名的class包含里,maven执行过程中打印的各类异常日志内容 比如如下错误 错误信息分别来自( ...

  3. LVS负载均衡在Ubuntu环境下部署详解

    一.本地环境介绍: 负载均衡的三台机器均为Ubuntu Server 14.04 64位系统,内核中已集成ipvs模块( modprobe -l | grep ipvs 查看 ).为演示LVS负载均衡 ...

  4. 第 20 课 go如何实现继承的 && 给引用模块起别名

    golang语言中没有继承,但是可以依靠组合来模拟继承和多态. package controllers import ( "encoding/json" md "gowe ...

  5. dropout含义与原理

    含义 在训练过程中,对神经网络单元按照一定比例暂时将其丢弃. 原理 由于网络参数过多,训练数据少,或者训练次数过多,会产生过拟合的现象.dropout产生的一个重大原因就是为了避免过拟合. 每一层的神 ...

  6. XMemcached的基本使用

    XMemcached是memcached的一个java客户端,基于java nio,支持memcached的所有协议.本文简要介绍XMemcached的基本使用. 一.添加依赖 <depende ...

  7. 使用runtime完成解档归档

    简单的创建一个Person对象,并声明几个属性 @interface Person : NSObject<NSCoding> // 归档问题 必须遵守该协议 /** */ @propert ...

  8. python3.7 完美安装

    在安装python3.7的过程中,我发现如果不加注意,pip3是无法被安装的.而这就不能算是完整安装python3了. 所以,我总结一下,如何完美安装python3.7.   依赖 yum insta ...

  9. java - redis学习

    在学习redis之前,我们首先需要了解一下NoSQL(非关系数据库).非关系型数据库通常指数据以对象的形式存储在数据库中,而对象之间的关系通过每个对象自身的属性来决定. 为什么需要NoSQL? (1) ...

  10. MySQL 新建用户,为用户授权,指定用户访问数据库

    1.登录MySQL mysql -u root -p 2.添加新用户(允许所有ip访问) create user 'test'@'*' identified by '123456';(test:用户名 ...