'Can I replace MariaDB with MySQL in Bitnami MAMP?
I am maintaining an old, large CakePHP project which relies on the JSON database column type. This type is supported by MySQL but not by MariaDB. Changing out the JSON type is not a practical option.
I have been relying on the Bitnami MAMP stack to run this project, but after upgrading I discovered that there's no longer an option to run MySQL in the newer versions.
Is there a way of manually swapping out MariaDB for MySQL?
I am relying a lot on PhpMyAdmin for database admin tasks, so I need this to connect correctly as well.
I already tried the option of running the MacOS built-in Apache and MySQL installs, but it seems very hard to get this setup to run in a reliable way, and when asking for advice people seem to think it's not a great option. The Bitnami packaged MAMP stack, on the other hand, runs really well. It's just this compatibility issue that messes things up for me.
Is it possible to keep things running smoothly and only swap out the database part of the stack?
Many thanks.
Solution 1:[1]
I went down many rabbit holes trying to find a good solution and ended up with the following. (Reminder that this is on Mac OS, in my case Catalina.)
Do a normal MySQL installation (you will get a MySQL icon in System Preferences)
Configure the PHP application to use host
127.0.0.1(not localhost) and port3306Install a second PhpMyAdmin instance (in my case at /phpmyadmin-mysql)
Create a config.inc.php file in the PhpMyAdmin root directory.
The file should have the following settings.
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '3306';
I can now use either MySQL or MariaDB over the same Apache instance by just setting the host and port number.
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 | Simon |
