Fixing https://mariadb.org/mariadb-dump-file-compatibility-change/ Error is caused by an incompatibility when trying to import a mariadb databased into a mysql server. I fixed this by swapping mysql on my macbook with mariadb (the live server runs mariadb - switching it to mysql wasn't an option).
Requires homebrew. Not meant for running on an actual server.
- Added the shell scripts to desktop and gave them execute permissions:
a.
chmod +x ~/Desktop/backup.sh && chmod +x ~/Desktop/restore.sh
- Make a backup of all databases (to add them to mariadb in step 7) with cd ~/Desktop && ./backup.sh
- Double check all databases are in ~/Desktop/mysql_backups/ folder
- Stopped all mysql services in dbngin
- removed any homebrew mysql installations:
a.
brew uninstall --force mariadb mysql
b.rm -rf /opt/homebrew/etc/my.cnf*
c.rm -rf /opt/homebrew/var/mysql
- Install fresh mariadb
a.
brew install mariadb
- If you usually use the root user with blank password during local dev, you need to update in mysql:
a.
sudo mysql -u root
(input your mac password) b.SET PASSWORD = PASSWORD('');
(from inside mysql command line) c.exit;
(from inside mysql command line to go back to terminal) - Add the databases to mariadb
cd ~/Desktop && ./restore.sh