"Unable to load from mysql.procs_priv. Table probably corrupted" on Osx / homebrew

Problem:

Getting Cannot load from mysql.procs_priv. The table is probably corruptedwhen trying to create a new mysql user.

Platform : OSX Yosemite, Homebrew

The solutions have already tried other answers :

  • Modernization: mysql_upgrade -uroot -p
    • I had to use --forcebecause of this:This installation of MySQL is already upgraded to 5.7.9, use --force if you still need to run mysql_upgrade
    • Then I had to use --skip-version-checkbecause of this:Error: Server version (5.7.18) does not match with the version of the server (5.7.9) with which this program was built/distributed. You can use --skip-version-check to skip this check.
    • still not working after all this
  • Reducing the request to the most obvious and removing functions :, CREATE USER 'newuser';still throws the same error.
  • Restore mysql.procs_priv table
  • char mysql.procs_priv varchar, . , text, mysql.
+4
2

mysql ( 15 ).

1. UNINSTALL AND PURGE MYSQL

  • .
  • MySQL. ps -ax | grep mysql
  • mysql

    brew remove mysql
    brew cleanup
    
  • sudo rm /usr/local/mysql
    sudo rm -rf /usr/local/var/mysql
    sudo rm -rf /usr/local/mysql*
    sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    sudo rm -rf /Library/StartupItems/MySQLCOM
    sudo rm -rf /Library/PreferencePanes/My*
    
  • launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist 
    
  • . MYSQLCOM=-YES- /etc/hostconfig

  • sudo rm -rf ~/Library/PreferencePanes/My*
    sudo rm -rf /Library/Receipts/mysql*
    sudo rm -rf /Library/Receipts/MySQL*
    sudo rm -rf /private/var/db/receipts/*mysql*
    sudo rm -rf /private/var/db/receipts/*mysql*
    sudo rm -rf /private/var/mysql
    
  • . .

2. MYSQL

  • Mysql

    brew install mysql
    
  • brew services start mysql
    
  • mysql_secure_installation
    
+1

, :

mysql_upgrade -u root -p

.

+1

Source: https://habr.com/ru/post/1676013/


All Articles