You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
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).
# 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.
I've found the issue. Actually, there are 2 issues.
The first is that you need to set a character set by passing something like --character-set utf8 to the command. That's easy.
The second is the more problematic one, and is actually a problem with the connector, not the utilities.
The issue is due to this bit https://github.com/mysql/mysql-connector-python/blob/master/lib/mysql/connector/connection_cext.py#L514
I have a PR up on the mysql-connector-python repo with more technical details.
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 themysql-connector-python
package from pip (pip install --user mysql-connector-python
). We are trying to see the diff between the 2 databasesSince 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:For
mysqldbcompare
, I am running the command:However, I am getting the following errors:
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.5mysql-connector-python
Version: 8.0.13The text was updated successfully, but these errors were encountered: