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

下面看下整个过程

重启MySQL

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

可以看到mysql重启不了

查看my.cnf的权限

  1. [root@ttlsa ~]# ls -l /etc/my.cnf
  2. -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. Andriod Studio中setText输出中文在AVD中显示乱码的解决方法

    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);      ...

  2. [hihoCoder] #1044 : 状态压缩·一

    时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi和小Ho在兑换到了喜欢的奖品之后,便继续起了他们的美国之行,思来想去,他们决定乘坐火车前往下一座城市——那座城市即将 ...

  3. linux快速进入全屏命令行模式

    按CTRL+ALT+F1~6就可以了.F7是桌面环境.

  4. PHP二维数组如何根据某个字段排序

    分享下PHP二维数组如何根据某个字段排序的方法. 从两个不同的表中获取各自的4条数据,然后整合(array_merge)成一个数组,再根据数据的创建时间降序排序取前4条. 本文记录的要实现的功能类似于 ...

  5. [k8s]容器化node-expolore(9100)+cadvisor(8080)+prometheus(9090) metric搜集,grafana展示

    Prometheus 的核心,多维数据模型 传统监控工具统计数据方式 指标多 - 需求1,统计app1-3,的(总)内存,则定义3个指标 container.memory_usage_bytes.we ...

  6. kvm最小磁盘大于等于5G

    上图的实验为4G(磁盘的大小) 后来磁盘大小增加到5G后,成功安装! [root@bass virhost]# virt-install --name 22cache --ram=512 --arch ...

  7. java concurrency

    Dealing with InterruptedExceptionhttp://www.ibm.com/developerworks/java/library/j-jtp05236/index.htm ...

  8. python random模块(获取随机数)的常用方法及示例

    random.randomrandom.random()用于生成一个0到1的随机符点数: 0 <= n < 1.0 random.uniformrandom.uniform(a, b),用 ...

  9. redis使用日志(3):如何设置持久化

    Redis 持久化 Redis虽然是一种内存型数据库,一旦服务器进程退出,数据库的数据就会丢失,为了解决这个问题Redis提供了两种持久化的方案,将内存中的数据保存到磁盘中,避免数据的丢失. 工作目录 ...

  10. VC++编程之道读书笔记(2)

    第三篇 技术细节 第七章:细说开发人员必知必会的39个开发细节 细节36:单例模式的应用 在开发程序时,往往需要在整个工程中只需要一个类的实例.而这个实例一旦被创建就不能被其他的实例再创建了,通常我们 ...