Problem:
Getting Cannot load from mysql.procs_priv. The table is probably corrupted
when trying to create new mysql user.
Platform: OSX Yosemite, Homebrew
Tried all the below and DID NOT WORK:
mysql_upgrade -uroot -p
--force
because of this: This installation of MySQL is already upgraded to 5.7.9, use --force if you still need to run mysql_upgrade
--skip-version-check
because 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.
CREATE USER 'newuser';
, still throws same error.char
columns in mysql.procs_priv
to varchar
, as suggested here. Well he suggested changing to text
but that seemed too crazy for a core mysql table.I think it will be better to use this:
mysql_upgrade -u root -p
Enter your password and wait a few seconds.
Completely removing mysql and reinstalling it worked (less than 15 mins).
1. UNINSTALL AND PURGE MYSQL FROM SYSTEM
ps -ax | grep mysql
Uninstall mysql
brew remove mysql
brew cleanup
Remove all the residual files
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*
Unload previous auto login
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Remove previous config. Delete the line MYSQLCOM=-YES-
from /etc/hostconfig
Remove previous preferences
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
Optional, restart computer. I didn't.
2. INSTALL MYSQL
Install Mysql
brew install mysql
Set to run on startup
brew services start mysql
Secure the installation
mysql_secure_installation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With