Can't use mysqldiff
or mysqlcompare
#42
Description
We are using AWS RDS MySQL version 5.6.10. I have installed mysql-utilities from https://github.com/mysql/mysql-utilities via the manual install method (python2 setup.py install
) and the mysql-connector-python
package from pip (pip install --user mysql-connector-python
). We are trying to see the diff between the 2 databases
Since I am using Python2
and by extension, pip
from Homebrew, I had to modify the script a little bit (using /usr/local/bin/python2
rather than /usr/bin/python
).
For mysqldiff
I am running the command:
mysqldiff \
--server1='[username1]:[password1]@[servername1].rds.amazonaws.com:3306' \
--server2='[username2]:[password2]@[servername2].rds.amazonaws.com:3306' \
--difftype=differ \
[databasename1]:[databasename2]
For mysqldbcompare
, I am running the command:
mysqldbcompare \
--server1='[username1]:[password1]@[servername1].rds.amazonaws.com:3306' \
--server2='[username2]:[password2]@[servername2].rds.amazonaws.com:3306' \
--difftype=differ \
[databasename1]:[databasename2]
However, I am getting the following errors:
# WARNING: Using a password on the command line interface can be insecure.
Traceback (most recent call last):
File "./src/mysqldbcompare", line 299, in <module>
servers = connect_servers(server1_values, server2_values, conn_opts)
File "/usr/local/lib/python2.7/site-packages/mysql/utilities/common/server.py", line 489, in connect_servers
source = get_server(src_name, src_dict, quiet, verbose=verbose)
File "/usr/local/lib/python2.7/site-packages/mysql/utilities/common/server.py", line 336, in get_server
server_conn.connect()
File "/usr/local/lib/python2.7/site-packages/mysql/utilities/common/server.py", line 1104, in connect
res = self.show_server_variable('character_set_client')
File "/usr/local/lib/python2.7/site-packages/mysql/utilities/common/server.py", line 1391, in show_server_variable
return self.exec_query("SHOW VARIABLES LIKE '%s'" % variable)
File "/usr/local/lib/python2.7/site-packages/mysql/utilities/common/server.py", line 1327, in exec_query
cur.close()
File "/usr/local/lib/python2.7/site-packages/mysql/connector/cursor.py", line 395, in close
self._connection.handle_unread_result()
File "/usr/local/lib/python2.7/site-packages/mysql/connector/connection_cext.py", line 614, in handle_unread_result
raise errors.InternalError("Unread result found")
mysql.connector.errors.InternalError: Unread result found
Why I think this is a mysql-utilities
error:
I tried manually connecting via mysql --host='[servername].rds.amazonaws.com' --user=[username] --password='[password]' --port=3306
and I was able to connect with no errors.
Further info:
MySQL Version: 5.6.10 AWS RDS
Python 2 Version: Python 2.7.15 (from macOS Homebrew)
mysql-utilities
Version: 1.6.5
mysql-connector-python
Version: 8.0.13