If you’re looking to upgrade to Mautic 3.x, there are a few key requirements and steps to follow. Mautic 3.x requires MySQL 5.7.14 or MariaDB 10.2 to function properly. In this guide, we’ll walk you through the upgrade process to ensure everything goes smoothly.
Prerequisites
Before starting, make sure your environment meets the following:
•MySQL 5.7.14 or MariaDB 10.2 is installed (you need at least this version).
•Back up your database to avoid any risk of data loss.
Steps for Upgrading
1.Prepare the Environment
Log into your MySQL terminal and run the following command to disable fast shutdown:
SET GLOBAL innodb_fast_shutdown = 0;
2. Backup Your Database
To avoid losing data, run a mysqldump to create a backup of your database:
sudo mysqldump -u root -p database_name > backup_database.sql
3. Uninstall MariaDB 10.0 or 10.1
If you are running MariaDB 10.0 or 10.1, you’ll need to uninstall it first:
sudo systemctl stop mariadb.service
sudo apt remove mariadb-server
sudo apt remove mariadb-server
4. Install MariaDB 10.2 or MySQL 5.7+
Add the MariaDB 10.2 repository to your sources list and install the required packages:
sudo apt-get install software-properties-common
sudo apt-key adv –recv-keys –keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo sh -c “echo ‘deb [arch=amd64,i386] https://mirrors.evowise.com/mariadb/repo/10.2/ubuntu ‘$(lsb_release -cs)’ main’ > /etc/apt/sources.list.d/MariaDB-10.2.list”
sudo apt-get update
sudo apt-get install mariadb-server mariadb-client
sudo mysql_upgrade
5.Handling MySQL Plugin Errors
You might encounter an error when running the mysql_upgrade command:
ERROR 1524 (HY000): Plugin ‘unix_socket’ is not loaded
FATAL ERROR: Upgrade failed
If you see this, follow these steps to resolve it:
•Switch to root:
sudo su
• Stop the MySQL service:
/etc/init.d/mysql stop
• Start MySQL in safe mode:
mysqld_safe –skip-grant-tables &
• Log in to MySQL:
mysql -uroot
• Update the root password and plugin:
use mysql;
update user set password=PASSWORD(“mynewpassword”) where User=’root’;
update user set plugin=”mysql_native_password”;
quit;
• Restart MySQL:
/etc/init.d/mysql stop
kill -9 $(pgrep mysql)
/etc/init.d/mysql start
mysql -u root -p
6. Final Verification
After resolving any plugin issues, your Mautic instance should now be compatible with the latest version. Test everything to confirm that Mautic 3.x is running smoothly on your newly updated database.
Conclusion
By following these steps, you can smoothly upgrade your Mautic instance to 3.x, ensuring you meet the database version requirements and avoid potential errors along the way. If you’re hosting Mautic with Mailertizer, we can assist with the upgrade process, ensuring everything is handled with minimal downtime.
Feel free to leave any questions or comments below!