How to restore mysql privileges after bad chown

23,879

On my CentOS box, the own and group is mysql and the install is here. This will fix your mysql permissions.

chown -R mysql:mysql /var/lib/mysql

However, chown -R root / is no doubt going to have caused you a few more problems than simply MySQL.

Share:
23,879
Jayyrus
Author by

Jayyrus

I'm an Italian Software Engineer. I like very much to learn and study new technologies

Updated on July 05, 2022

Comments

  • Jayyrus
    Jayyrus almost 2 years

    wrongly i set owner on all the files in my server to root :

    chown -R root /
    

    now i have some problem with mysql server due to permission.

    How can i set mysql owner to the correct files?

    (I can't reinstall mysql server cause i have important table in my db )