zoukankan      html  css  js  c++  java
  • Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

           今天,登陆阿里云账号后,发现服务器有一个警告说有漏洞,修复完后要重启服务器,想都没想直接重启了。。。

           接下来事情发生了,想着直接重启mysql就行。

          现象描述
                  [root@iZwz952coo41my3i5b7x2iZ ]# service mysqld start
                  Starting MySQL..The server quit without updating PID file (/usr/local/mysql/data/mysql/iZwz952coo41my3i5b7x2iZ.pid).[FAILED]

           启动数据库失败了,然后去找iZwz952coo41my3i5b7x2iZ.err这个文件,发现下面这一行:

            

             解决方法:

                    #查看/etc/my.cnf配置文件

                    

                 #由于编译安装mysql时指定的路径为/usr/local/mysql以及mysql_install_db时指定的datadir也为/usr/local/mysql,而my.cnf为缺省的路径
         #因此修改datadir为正确路径后,问题解决

                   [root@iZwz952coo41my3i5b7x2iZ ]# service mysqld start
         Starting MySQL.[  OK  ]

  • 相关阅读:
    导出api文档
    Webservice测试从头来
    Java8新特性【转】
    spring获取bean的时候严格区分大小写
    java static 方法使用笔记
    maven Spring获取不到配置文件
    4月22日
    4月21日
    9月20日
    9月18日
  • 原文地址:https://www.cnblogs.com/huangheng01/p/8669456.html
Copyright © 2011-2022 走看看