'Upgrade MySQL on Mac
I did an upgrade of my XAMPP from 7.1.24 to 7.4.2. First I uninstall my XAMPP using uninstall.app
, then I install my new XAMPP, then i check my phpmyadmin everything look ok. But when i open one of my db it said Table doesn't exists in engine
. I tried to drop the database it said
#1558 - Column count of mysql.proc is wrong.
Expected 21, found 20.
Created with MariaDB 100108, now running 100411.
Please use mysql_upgrade to fix this error
I search the mysql_upgrade people say just write it on terminal or cmd. I tried it but it say command not found
then i found people are saying i should do this export PATH=${PATH}:/usr/local/mysql/bin
on ~/.bash_profile
but the problem is there's no mysql folder on /usr/local/
. What should i do?
I'm using macOS 10.15.2.
Solution 1:[1]
If you are using XAMPP and you can see the XAMPP folder in the applications folder, so you can run this:
cd /Applications/XAMPP/xamppfiles/bin/
sudo mysql_upgrade
you should see something like:
sudo ./mysql_upgrade
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
Processing databases
app
app.areas OK
app.departments OK
app.kiosks OK
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
Note: There appear to be a bug in XAMPP - https://community.apachefriends.org/f/viewtopic.php?f=17&t=78386&sid=3d3824dd0b6aa2e33c3adc73c744b4b4
Solution 2:[2]
(MacOs) I ran mysql_upgrade in the terminal from:
/Applications/XAMPP/xamppfiles/bin
using:
sudo ./mysql_upgrade
and it upgraded mysql be patient at some points it seemed to be stalled but just needs time to complete the upgrade.
Solution 3:[3]
If you get a "command not found" you may look with
locate mysql_upgrade
where it is. For me it is
/Applications/MAMP/Library/bin/mysql_upgrade
Solution 4:[4]
Open terminal app and run brew upgrade mysql
command, it may help.
If you got the command not found: brew
it means brew is not installed on your mac and you should install it with this command :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
and then retry the first command for upgrading mysql
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | HMagdy |
Solution 2 | hakkikonu |
Solution 3 | Ralf Viellieber |
Solution 4 | Ali Lashini |