I’ve been using MySQL on my macOS for dev for years, and in the past year or two I’m noticing some issues with keeping up Workbench-app and MySQL hanging (locking up) with XOJO. What is everyone using these days - am I the only person who hasn’t jumped over to PostgreSQL?
MySQL and PostgreSQL are not the same syntax in places.
MariaDB is a completely free drop in replacement for MySQL. It doesn’t have a Workbench equivalent though.
Hi @Ian_Kennedy , I’ve been using MariaDB in deployment on XOJO Cloud, and Navicat (app) as my ‘workbench’ for RDBMS. My workflow has me hand-testing a query in MySQL, and toggling over to Navicat to verify it works there - and I avoid platform-specific db functions to keep things relatively safe and portable ![]()
So many people are using Supabase, and it has a free version - which is tempting. I was hoping for a ‘free to dev with’ copy of PostgreSQL that runs on my dev machine and has some form of workbench-like mgmt tools. Even workbench itself is getting a bit long in the tooth.
Do you use MariaDB locally, and is it a ■■■■■■ to get installed?
I’m on Mac and I use MariaDB locally and on my server. I use Homebrew to install extras like MariaDB and it is extremely simple to install and use.
After it is installed go to Terminal and use
brew install MariaDB
Updates are available from time to time.
brew update
brew upgrade
Restart if required.
brew services restart MariaDB
I use it for Apache and PHP too, as I use Maria for websites.
Forgot to say, MySQL workbench works with MariaDB.
@William_Reynolds , similarly we are using a combination of MariaDb and Navicat.
If you are happily using Navicat (even the free version) then IMO you are light years ahead of MySQL Workbench on Mac which for us had issues compared to its Windows equivalent.
If you have the paid version of Navicat you are operating a different galaxy to Workbench.
True. That’s the headline, but in reality it’s more complicated. We gave up on the notion, you could develop against MySQL locally, then deploy to Xojo Cloud (using MariaDb) without issue, especially if you work with json.
My recommendation is maintain a dev schema and live schema in the same environment, or if that is not possible, separately running identical database versions.
Even having local (dev) and cloud (deployment) of differing sub point versions of MariaDb have caused us issues in the past, as MariaDb drifts further from MySQL.
It’s not worth the time to troubleshoot errors between differing environments statement by statement.
It’s also great to instil in developers that dev schemas should have all the protections of live schemas.
' using your current environment as an example
If DebugBuild Then // we are debugging locally
' then connect to dev schema on Xojo Cloud via ssh tunnel
Else // app is deployed
' connect to live schema locally on Xojo Cloud
End
I hope that helps.
Kind regards, Andrew
Personally I’ve been using MariaDB with dBeaver. For major projects, I have my server environment in a VM where I can take a copious number of snapshots to cover myself when I inevitably screw something up. But once it’s ready to go to prod I can image the VM at a particular checkpoint and deploy that image to a VPS.
Obviously this approach works for a solo developer but probably won’t for a team.
Been playing with Neo4j lately too alongside MariaDB. Really depends on what kind of data you have, some of my data benefits from a graph database where it’s easier to query relationships.
There’s nothing stopping you using the same versions on each platform. However, differences can still exist.
If your server is Linux then macOS doesn’t support case sensitive file names by default. To ensure table names differences don’t occur you either have to enable it or rely on naming conventions.
Server development databases would be complex to setup. You don’t want open DB connections to your server. So vpn or equivalent would be needed.
You might want to look at this Xojo Guest Blog Post: Docker, Database Servers and Xojo.
It explains how to do that using Docker, and also links to ready to use configurations: GitHub: jo-tools/docker.
It has examples for:
- PostgreSQL Server & pgAdmin
- MariaDB & phpMyAdmin
- cubeSQL & cubeSQL Web Admin
A quote from the Blog Post:
I like to have a development machine that’s as cleaned up as possible. So I don’t like the idea of installing various servers just for some tests. It’s so tedious to clean up, update to other versions, and remove all remnants of an installation when no longer required. And I don’t want to have various services running on my machine that I don’t need all the time, as they’re just eating precious memory and slowing down the machine.
Wouldn’t it be cool if there was an easy way to spin up various database servers when needed without all the hassle? Well there is – let’s have a look at Docker and Docker Compose.
Dbngin by the TablePlus people is the easiest way to install development databases on Mac in my opinion.
It’s an actual Mac app installing native binaries.