Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

前端 未结 18 2267
轮回少年
轮回少年 2020-12-04 15:29

I am on a server that has afresh install on RHEL 5. I was able to install Apache and PHP just fine., but I am having serious trouble with my MySQL installation. I tried t

18条回答
  •  伪装坚强ぢ
    2020-12-04 15:42

    For myself, I had to do:

    yum remove mysql*
    
    rm -rf /var/lib/mysql/
    cp /etc/my.cnf ~/my.cnf.bkup
    
    yum install -y mysql-server mysql-client
    
    mysql_install_db
    
    chown -R mysql:mysql /var/lib/mysql
    chown -R mysql:mysql /var/log/mysql
    
    service mysql start
    

    Then I was able to get back into my databases and configure them again after I nuked them the first go around.

提交回复
热议问题