-
-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install matching mysql/mysqldump/mariadb-dump client inside ddev-webserver based on mysql or mariadb database type #6083
Comments
Answering to #6139 (comment) in the relevant issue:
There is The current latest version is How to install The SO example needs to be modified to change the |
I'm not sure there's a client package, but if there is this can be great! |
Now that MariaDB has released mariadb-dump/mysqldump versions that are completely incompatible with "traditional" versions, we're going to have to prioritize this. From: https://mariadb.com/kb/en/mariadb-dump/
Basically, all the latest supported patch versions of mysqldump from mariadb are completely incompatible (without workarounds) with the previous patch version. So mariadb-dump/mysqldump 10.6.18's version is incompatible with 10.6.17. What's up with them!!!
|
Indeed mariadb has added sandbox mode, and database backups fail. |
MariaDB Blog about the change to dump file format: https://mariadb.org/mariadb-dump-file-compatibility-change/ |
FYIW - We are mitigating with the following commands on the web container: docker exec -ti ddev-PROJECT-web bash
sudo apt remove mariadb-client -y
sudo curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version="mariadb-10.11"
sudo apt install mariadb-client -y |
Thanks @cristiroma - It would be a lot better as a .ddev/web-build/Dockerfile.mariaclient or something, you wouldn't have to do it all the time. |
I was able to import a file dumped with the new mariadb-dump by deleting the line at the top of the dump that says |
The affected DDEV database images have been pushed with updated mariadb tools, please see
|
Doesn't work anymore:
|
It's working, https://r.mariadb.com/downloads/mariadb_repo_setup was down, but it's fine now. |
The mariadb:10.11 approach described above (from https://mariadb.com/kb/en/mariadb-package-repository-setup-and-usage/) does work currently. However, 10.6 does not work, on either amd64 or arm64 with Debian Bookworm:
And of course, 10.6 is the exact example they provide in their docs. |
However, I'll bet that the mariadb 10.11 client will work for most of the mariadb situations. That's a pretty simple approach. |
mysql has never provided arm64 packages for Debian/Ubuntu, and they still don't. Info about their apt repo is at https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/ Ubuntu does package mysql server for arm, it's conceivable that we can steal the client and its dependencies from a related Ubuntu version. This is how we do mysql server for DDEV, see https://ddev.readthedocs.io/en/stable/developers/release-management/#maintaining-ddev-dbserver-mysql-57-and-80-arm64-images |
It looks like if we want to do the mysql client, we'll have to build from source, https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/source-installation.html, as we do for xtrabackup. |
One thing we could do for mariadb is to replace mysqldump and mysql with wrappers that strip |
I think
|
Mostly what we have left to do on this one is to try for matching psql clients. |
So this issue is now majorly burning us on new projects that use AWS Aurora DBs where we need to set the DDev version to MySQL. We're running into major issues and due to all of the requirements we have we need to be running MySQL 5.6. I see that just today a commit was made to address MySQL 5.7 & 8.0, I don't see any fixes for 5.6 though. This is causing issues for WP-CLI to do a |
@timnolte I assumed that MySQL 5.6 was so far out of support (even 5.7 is EOL) that nobody would be using it. If you use Could you please give the exact scenario and result that you get? |
As a last-ditch attempt to provide solutions for unusual situations, we're putting an older mysql/mysqldump/mariadb/mysqldb-dump into the ddev-webserver in /usr/local/mariadb-old/bin. This will be usable by adding /usr/local/mariadb-old/bin into the PATH inside the container before /usr/bin. Until this last month, the mariadb client and mysqldump have been compatible with MySQL and MariaDB for 20 years. So making the old version available there is another shot at this. This is currently testing in today's |
We had some major compatibility issues between MariaDB, MySQL, and Aurora DB(AWS) along with a WordPress plugin from Automattic that we use for distributed database connectivity. We need to be on a MySQL version in DDev in order to be able import backups from the Aurora DB but I think because the I would be inclined to try and see if MySQL 8.0 will work the way we need it to if that version of the client is actually installed in the |
I would appreciate it if you'd try the current HEAD, preferably with MySQL 5.7 or 8.0. Also if you can come up with the actual specific scenario it will help. Previously, the DDEV web container always had a MariaDB client in it. Now if 5.7 or 8.0 it will have the related mysql client in it. |
OK, will give 5.7 or 8.0 a try. I don't recall, how do I go about installing the HEAD. I've been using the install_ddev.sh script for awhile as I install to my home directory. I was looking through the script and I thought that it was only pulling from the releases. |
I gave you the link to the docs in my request above. #6083 (comment) |
Oops, doing this on my phone since it's out of my working hours. Will circle back around tomorrow. |
In general, the
mysql
client shipped with the ddev-webserver works fine with all mariadb and mysql back-end databases.However, there are a few cases where their behavior is slightly different.
And the fact that the
mysql
client reports a different version is often confusing to people.For example, with database mysql:8.0 we see these outputs:
The web container has the mariadb version, and the db container has the mysql:8.0 version.
On Craft CMS and perhaps some other places, people have the habit of using the built-in tools; Craft actually calls out to the mysql client (on ddev-webserver) rather than connecting directly to the database server, so this can cause confusion there.
Proposal
Add a layer to the ddev-webserver adding a matching
mysql
client to the ddev-webserver, especially where the database type is mysql:8.0, which is the most likely place for concern.It also might be possible to implement this as an add-on for the few people it matters to. It's tricky getting the proper match between the OS-provided
mysql
client and the ddev-webserver, and it could introduce instabilities.The text was updated successfully, but these errors were encountered: