When will MySQL 8 be mandated? Which ver?

During todays update to 4.41.2 I noted a warning:

│Warning: MySQL 8 will be the required database in the next major release of Ghost.

Any information on when / which version? Is this planned for v5?

I host on Debian, and the default mysql-server package is mariadb-server-10.5 - (yes, IMHO Debian made a mistake, but I go with their stable recommendations for production). So looks like a migration from mariadb-server-10.5 to mysql-server-8.0. If anyone has done this, gotcha’s appreciated.

Jeff

Yep, Ghost will need MySQL 8 for v5.0+ as it’s a breaking change!

To be clear, is this warning for MySQL 5.x users, or will it break MariaDB 10.x installations?

@mjw The warning is for all users who are not using MySQL 8.x, although I think there is a bug in CLI not showing it for MariaDB - I’ll be looking into that next week.

Strictly speaking, MariaDB is not officially supported by Ghost, but it still happens to work.

I’d still recommend switching now because we’re unable to provide support for any issues encountered with MariaDB in the future :slightly_smiling_face:

1 Like

Thanks for the clarification, @daniellockyer. I’ll perform the update in due course although I would prefer to use MariaDB over MySQL.

I saw the message when performing my most recent upgrade.

@mjw Good to know! Thanks :slightly_smiling_face:

1 Like

It would seem that MariaDB and MySQL are already diverging so that importing from mysqldump results in incompatibility errors. I need to come up with a plan C (plan A failed because the packaged MySQL 8.0 in Ubuntu 20.04.04 is broken.)

These are the steps I’ve taken to install MySQL 8.0.

  1. Take a snapshot of the Linode.
  2. Remove MariaDB completely:
cd ~
sudo mysqldump -u root -p --all-databases >mariadbdump.sql
sudo dpkg -l | grep mariadb
systemctl status mariadb
sudo systemctl stop mariadb
sudo apt purge mariadb-*

sudo apt purge mysql-*
sudo cp -R /var/lib/automysqlbackup/ ~
sudo dpkg -l | grep mariadb
sudo dpkg -l | grep mysql
sudo apt autoremove
sudo apt autoclean
sudo rm /etc/apt/sources.list.d/mariadb.list
  1. Install MySQL from official repo.
wget --content-disposition https://dev.mysql.com/downloads/gpg/?file=mysql-apt-config_0.8.22-1_all.deb&p=37
sudo apt update
sudo apt-cache policy mysql-server
sudo apt install mysql-client mysql-community-server mysql-server
sudo mysql_secure_installation

  1. Import databases:
mysql -u root -p < mariadbdump.sql 

ERROR 1064 (42000) at line 5957: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns'' at line 14

I’m thinking that a direct export from Ghost is my best option.

I would :thinking::

  1. Don’t forget your GRANTS
  2. check your /etc/mysql folder after purge - just to be sure
  3. Should be easy to remove the incompatible change in the dump - s:///g ??

I will be running my upgrade tests this week and will post the results

What is exactly is wrong with Ubuntu MySQL8?

After a few busy weeks, I have had time to spend on this, and I’m pleased to say the migration went well, and I’m running on MySQL 8.

I’ll post the steps in another thread, as this may be useful to others.

I was able to use the Ubuntu repo this time, so I’m uncertain why it failed last time around.

2 Likes

Will there be any sort of migration guide on how to migrate with Ghost running in Docker?

Been giving it a try and having some issues. For instance, how do you dump the current sqlite db?

I don’t believe Docker is officially supported by Ghost; this is something that’s community maintained.

Furthermore, I neither use Docker nor SQLite, but the official route is to reinstall.

You can use Ghost admin to export / import content, members, routes etc.