As part of our build process, we use the mysqldiff
utility (invoked from maven) to validate our database migration scripts by comparing a freshly-built copy of the schema to a version of the schema created from a baseline plus our migration script. This all works fine with MySQL 5.7.
We are looking to upgrade to MySQL 8.0.13. The database user has been configured to use mysql_native_password
. When we run our build, we are getting this error from mysqldiff
:
ERROR: Authentication plugin 'caching_sha2_password' is not supported
We understand that this error is due to the fact that the utility is using an old version of mysql-python-connector. We also understand that the answer might be as simple as upgrading the connector version, but we don't know how to go about trying that.
The MySQL Utilities can be found at https://github.com/mysql/mysql-utilities.
On Windows 10, we install using the Oracle windows installer. On Amazon Linux, we install with yum.
NOTE:
How do we work around this error so that we can use mysqldiff with a MySQL 8.0.13 server on Windows 10 and Amazon Linux?
If the answer is simply to upgrade the connector, what are the detailed steps for doing that?
Are there server installation/configuration changes we can make to support clients connecting with old drivers?
The first one is usually called mysql-server. This package contains the server and all utilities to connect to the server. The second package is called mysql-client and contains only the utilities. We can use it to connect to a server on a reachable location elsewhere.
MySQL 8.0 increases the overall reliability of MySQL because : MySQL 8.0 stores its meta-data into InnoDB, a proven transactional storage engine. System tables such as Users and Privileges as well as Data Dictionary tables now reside in InnoDB. MySQL 8.0 eliminates one source of potential inconsistency.
I have managed to run mysqldiff.py
against mysql 8, with some patches:
clone the patched source code and enter its dir:
$ git clone https://github.com/georgexsh/mysql-utilities.git
create a virtualenv and activate it:
$ virtualenv -p python2 venv
$ . venv/bin/activate
install the newer mysql connector:
(venv) $ pip install mysql-connector-python>=8.0
install mysql-utilities to the current virtualenv:
(venv) $ pip install .
now mysqldiff.py is able to run. if you want to run without activate virtualenv, you use its full path:
/path/to/mysql-utilities/venv/bin/mysqldiff.py
steps under windows are mostly the same, except virtualenv activation:
venv\Scripts\activate.bat
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With