今天在修改mysql数据库的配置文件,由于方便操作,就将“/etc/mysql/my.cnf” 的权限设置成 “777” 了,然后进行修改,当修改完进行重启mysql的时候,却报错,提示Warning: World-writable config file '/etc/mysql/my.cnf' is ignored ,大概意思是权限全局可写,任何一个用户都可以写。mysql担心这种文件被其他用户恶意修改,所以忽略掉这个配置文件。这样mysql无法重启。

下面看下整个过程

重启MySQL

[root@ttlsa ~]# /etc/init.d/mysql restart
Warning: World-writable config file '/etc/my.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf' is ignored
MySQL manager or server PID file could not be found![FAILED]

可以看到mysql重启不了

查看my.cnf的权限

 [root@ttlsa ~]# ls -l /etc/my.cnf
-rwxrwxrwx root root Jul : /etc/my.cnf

权限777,任何一个用户都可以改my.cnf,存在很大的安全隐患.

修复MySQL问题

  [root@ttlsa ~]# chmod /etc/my.cnf  
 

my.cnf设置为root用户可读写,其他用户不可写.

重启MySQL成功.

MySQL无法重启问题解决Warning: World-writable config file ‘/etc/mysql/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启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid)

    mysql启动报错Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.p ...

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

    今天重启一台内网服务器,发现mysql无法正常重启,执行systemctl start mysql,报错如下 Starting LSB: start and stop MySQL... Dec 11 ...

  4. 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 / ...

  5. Starting MySQL.. ERROR! The server quit without updating PID file (/var/mysql/data/feng.pid). 问题解决方案

    1.首先应该想到 授权 chown -R mysql:mysql /var/mysql/data  给mysql 用户 2.vim /etc/my.cnf [mysqld] datadir = /va ...

  6. mysql启动warning: World-writable config file

    如果在启动warning: World-writable config file /home/mysql/my.cnf is ignored原因:my.cnf的读取权限进行了设置,不允许World-w ...

  7. MySQL.. ERROR! The server quit without updating PID file问题解决

    不小心将服务器OS给重启了,再启动数据库的时候,出现了很奇怪的问题 [root@dev run]# service mysql restart ERROR! MySQL server PID file ...

  8. 【mysql】The server quit without updating PID file

      groupadd mysql useradd -r -g mysql mysql cd /usr/local/mysql chown -R mysql:mysql . scripts/mysql_ ...

  9. 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 最近在 ...

随机推荐

  1. 在windows下部署Redis 当作系统服务器自动启动

    部署Redis 其实Redis是可以安装成windows服务的,开机自启动,命令如下: redis-server --service-install redis.windows.conf 安装完之后, ...

  2. 不能与abstruct共同修饰方法的关键字

    一 抽象类:动态方法至少有一个是抽象方法. 其中abstruct关键字修饰的方法不能与哪些关键字共同修饰? 1private 因为private修饰的方法在子类中是隐藏的.不可见的.而abstruct ...

  3. tornado日志使用详解

    1.需求 将http访问记录,程序自定义日志输出到文件,按天分割,保留最近30天的日志. 2.使用示例 init_logging("%s/QYK.%s.%s.log" % (log ...

  4. hdoj2037 今年暑假不AC

    今年暑假不AC Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Sub ...

  5. js判断字符是否存在汉字的方法

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  6. malloc和free函数详解

    一.malloc()和free()的基本概念以及基本用法: 1.函数原型及说明: void *malloc(long NumBytes):该函数分配了NumBytes个字节,并返回了指向这块内存的指针 ...

  7. c#简单写售票系统

    原理: 先生成一个9行4列的数组,然后用一个输入的值(坐标)去替换掉座位 代码: using System; using System.Collections.Generic; using Syste ...

  8. 【Unity笔记】经典的鼠标点击射线检测碰撞

    void Update (){ )){ //从摄像机发出到点击坐标的射线 Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); Ra ...

  9. Kettle安装与配置

    设置好了之后可以测试下 后来百度发现是缺少mysql的JDBC连接驱动 kettle在初次配置的时候容易出这个问题,这个是由于java程序在连接mysql数据库的时候缺少驱动 我的kettle版本是4 ...

  10. java日期工具类DateUtil-续一

    上篇文章中,我为大家分享了下DateUtil第一版源码,但就如同文章中所说,我发现了还存在不完善的地方,所以我又做了优化和扩展. 更新日志: 1.修正当字符串日期风格为MM-dd或yyyy-MM时,若 ...