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

前端 未结 18 2253
轮回少年
轮回少年 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:57

    1. Uninstall mysql using yum remove mysql*

    2. Recursively delete /usr/bin/mysql and /var/lib/mysql

    3. Delete the file /etc/my.cnf.rmp

    4. Use ps -e to check the processes to make sure mysql isn't still running.

    5. Reboot server with reboot

    6. Run yum install mysql-server. This also seems to install the mysql client as a dependency.

    7. Give mysql ownership and group priveleges with:

      chown -R mysql /var/lib/mysql

      chgrp -R mysql /var/lib/mysql

    8. Use service mysqld start to start MySQL Daemon.

提交回复
热议问题