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
数据库版本:mysql5.7.16
按照说明给普通用户授权,执行binlog日志解析命令
python binlog2sql.py -h127.0.0.1 -P3306 -ulu -d zdgs-cloud --start-file='/var/log/mysql/binlog/mysql-bin.000033'
报错如下:
Traceback (most recent call last):
File "binlog2sql.py", line 149, in
back_interval=args.back_interval, only_dml=args.only_dml, sql_type=args.sql_type)
File "binlog2sql.py", line 46, in init
self.connection = pymysql.connect(**self.conn_setting)
File "/usr/lib/python2.7/site-packages/pymysql/init.py", line 90, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 706, in init
self.connect()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 945, in connect
self.autocommit(self.autocommit_mode)
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 760, in autocommit
self._send_autocommit_mode()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 778, in _send_autocommit_mode
self._read_ok_packet()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 767, in _read_ok_packet
pkt = self._read_packet()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1014, in _read_packet
packet.check_error()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error
err.raise_mysql_exception(self._data)
File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1184, u"Aborted connection 1742 to db: 'unconnected' user: 'lu' host: 'iZ8vb0gp5e8fybelqtsauuZ' (init_connect command failed)")
使用root用户报错如下
python binlog2sql.py -h 127.0.0.1 -P3306 -uroot --start-file='/var/log/mysql/binlog/mysql-bin.000033'
Password:
Traceback (most recent call last):
File "binlog2sql.py", line 149, in
back_interval=args.back_interval, only_dml=args.only_dml, sql_type=args.sql_type)
File "binlog2sql.py", line 53, in init
raise ValueError('parameter error: start_file %s not in mysql server' % self.start_file)
ValueError: parameter error: start_file /var/log/mysql/binlog/mysql-bin.000033 not in mysql server
binlog日志权限如下
ll /var/log/mysql/binlog/
total 4692
-rwxrwxrwx 1 root root 887 Sep 14 08:50 biglong_trx.txt
-rwxrwxrwx 1 root root 4784400 Sep 14 08:50 binlog_status.txt
-rwxrwxrwx 1 mysql mysql 2615 Sep 14 13:38 mysql-bin.000033
-rwxrwxrwx 1 mysql mysql 783 Sep 14 13:40 mysql-bin.000034
-rwxrwxrwx 1 mysql mysql 78 Sep 14 13:38 mysql-bin.index
The text was updated successfully, but these errors were encountered:
数据库版本:mysql5.7.16
按照说明给普通用户授权,执行binlog日志解析命令
python binlog2sql.py -h127.0.0.1 -P3306 -ulu -d zdgs-cloud --start-file='/var/log/mysql/binlog/mysql-bin.000033'
报错如下:
Traceback (most recent call last):
File "binlog2sql.py", line 149, in
back_interval=args.back_interval, only_dml=args.only_dml, sql_type=args.sql_type)
File "binlog2sql.py", line 46, in init
self.connection = pymysql.connect(**self.conn_setting)
File "/usr/lib/python2.7/site-packages/pymysql/init.py", line 90, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 706, in init
self.connect()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 945, in connect
self.autocommit(self.autocommit_mode)
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 760, in autocommit
self._send_autocommit_mode()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 778, in _send_autocommit_mode
self._read_ok_packet()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 767, in _read_ok_packet
pkt = self._read_packet()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1014, in _read_packet
packet.check_error()
File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error
err.raise_mysql_exception(self._data)
File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1184, u"Aborted connection 1742 to db: 'unconnected' user: 'lu' host: 'iZ8vb0gp5e8fybelqtsauuZ' (init_connect command failed)")
使用root用户报错如下
python binlog2sql.py -h 127.0.0.1 -P3306 -uroot --start-file='/var/log/mysql/binlog/mysql-bin.000033'
Password:
Traceback (most recent call last):
File "binlog2sql.py", line 149, in
back_interval=args.back_interval, only_dml=args.only_dml, sql_type=args.sql_type)
File "binlog2sql.py", line 53, in init
raise ValueError('parameter error: start_file %s not in mysql server' % self.start_file)
ValueError: parameter error: start_file /var/log/mysql/binlog/mysql-bin.000033 not in mysql server
binlog日志权限如下
ll /var/log/mysql/binlog/
total 4692
-rwxrwxrwx 1 root root 887 Sep 14 08:50 biglong_trx.txt
-rwxrwxrwx 1 root root 4784400 Sep 14 08:50 binlog_status.txt
-rwxrwxrwx 1 mysql mysql 2615 Sep 14 13:38 mysql-bin.000033
-rwxrwxrwx 1 mysql mysql 783 Sep 14 13:40 mysql-bin.000034
-rwxrwxrwx 1 mysql mysql 78 Sep 14 13:38 mysql-bin.index
The text was updated successfully, but these errors were encountered: