13

I have a heavy Mysql drupal 7 site and I was thinking about switching Mysql over to Mariadb, but I wasn't sure what issues I would run into. From what I'm reading Mariadb seems to be just a drop in replacement for Mysql and there doesn't seem much to fiddle with. I was wondering if Mariadb would affect drush commands?

  • ok i got my server techs to switch over to mariadb. so far haven't noticed anything major yet, but from our experience we had alot of issues while doing an upgrade. Since we were on an older version of cpanel, we had to first upgrade cpanel to the latest version, then update PHP, then update Mysql, then switch back the PHP version to 5.2 to maintain compatibility issues. Now we install MariaDB. It took 13 hours for this transition! A pricey lesson I must say, thinking it was only going to take less than an hour. Test on staging first! hopefully this helped someone, +rep if it did! thanks! – Patoshi パトシ Apr 26 '13 at 20:49
  • There are several issues to think about. Debian unix_socket default is one of it. I wonder that these issues are not discussed much. I assume many have their work flows and still stick with MySQL, thats why it is not well documented. Let me link to a new posted issue to collect some thoughts on this: drupal.stackexchange.com/questions/242634/… – nilsun Jul 27 '17 at 14:24
  • @nilsun Quite the opposite, pretty much everyone uses MariaDB these days. Here's Pantheon's canonical article on why they use it for hundreds of thousands of Drupal sites, for example: pantheon.io/blog/using-mariadb-mysql-replacement. The issues you're talking about seem to be niche, that's probably why you can't find much discussion about them – Clive Jul 27 '17 at 15:44
  • @Clive Thank you. I partly agree. But you count big players. A small dev team is another situation. If there is nobody in the team with the expertise to correlate Debian packaging behaviour and MariaDB philosophies you CAN (not must) encounter some small challenges from changes. And especially when you use Third party software, which has no error messaging prepared for such scenarios. – nilsun Jul 27 '17 at 16:33
4

Just wanted to chime in on this (albeit months late)... Have set up many Drupal sites in the past, decided to do things "better" this time and had MariaDB installed.

Everything works wonderfully (faster, cleaner, etc) with Drupal 7 EXCEPT for backup/restore :/ Always have to go directly into the db (whether through PHPMyAdmin, Heidi, or command line) and copy/export all of the tables.

Other than that, which there could be a number of reasons for happening, I highly recommend MariaDB. Less server resources used, D7 is much faster, etc etc.

  • But this thread is not about the pro and cons of MariaDB and how good it is. It is about well thought questions regarding production work flow changes to discuss with Drush. And there are several. – nilsun Jul 27 '17 at 14:29
8

As you say, Maria DB is a drop-in, completely transparent replacement for MySQL. Its releases coincide with the same major/minor version of MySQL so it's pretty much always in tandem as far as features are concerned. It reads the standard MySQL binary data files, uses the standard systen my.cnf, and even has a drop-in replacement for InnoDB.

The idea is that as far as your application is concerned it thinks it's connecting to a MySQL server. It uses MySQL drivers, issues full MySQL statements, and receives responses exactly as the MySQL server would send. Your app(s) won't know the difference.

I've been using Maria for a while now for Drupal sites (also using Drush extensively) and haven't had a single problem to date. If you're running *nix upgrading is just a two minute job.

  • awesome. just what i needed to know. thx! – Patoshi パトシ Apr 24 '13 at 19:51
  • one other thing is i occasionally do sql queries via the terminal. what would be the equivalent of doing a msyqldump? or drush sql-query 'select * from users' – Patoshi パトシ Apr 24 '13 at 19:53
  • I think mysqldump uses /usr/bin/mysql (or equivalent) internally, and since Maria symlinks that path to its own implementation you wouldn't need to make any changes, just continue using mysqldump as normal. I'd imagine the same applies to Drush. It might be worth checking up on that though to be certain – Clive Apr 25 '13 at 17:33
  • Google for "MariaDB Debian unix_socket access issues" ... There are still things to discuss and to document. – nilsun Jul 27 '17 at 14:30
  • @nilsun I haven't had experience of those issues - I've been running Drupal 7 on dozens (probably hundreds) of MariaDB-backed servers for years without problems. Pantheon run their entire Drupal/drush infrastructure on MariaDB, and I think Acquia do too. You might just be using the wrong version/configuration, or have a niche requirement that results in strange behaviour. All the agency developers I know also use MariaDB, wouldn't dream of using plain old MySQL, so it wouldn't appear to be a common problem (in my experience at least) – Clive Jul 27 '17 at 15:20
0

There are several issues to worry about. The Debian unix_socket root access issue is only one of them. I wonder that these issues are not discussed much. I assume many have their work flows and still stick with MySQL. That's why many of these issues are not well documented.

Related: MariaDB unix_socket causes access issues under Debian - Drush can't login (A new post started to collect thoughts on this.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.