Skip to content
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

TableMetadata.ColumnNames is null #29

Closed
a34546 opened this issue Oct 24, 2023 · 2 comments
Closed

TableMetadata.ColumnNames is null #29

a34546 opened this issue Oct 24, 2023 · 2 comments

Comments

@a34546
Copy link

a34546 commented Oct 24, 2023

我想获取TableMetadata.ColumnNames,但是它一是null,是我使用的不对吗?
image

以下是我启动mysql容器和配置:

[mysqld]
server_id= 1
log-bin=/var/lib/mysql/mysql-bin
expire_logs_days=30
character-set-server=utf8mb4
binlog_format=row
binlog_row_metadata = full
binlog_row_image = full
binlog_rows_query_log_events = on

docker run -p 3306:3306 --name mysql8 -v /home/mysql8/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf -v /home/mysql8/conf:/etc/mysql/conf.d -v /home/mysql8/logs:/logs -v /home/mysql8/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123.abc -d mysql:latest

@rusuly
Copy link
Owner

rusuly commented Oct 24, 2023

Hi, this should work with the binlog_row_metadata=FULL setting.
See the docs.
Make sure you restarted MySQL instance after updating the setting.
Also note that this setting is applied to the newly appended events to binlog.

@a34546
Copy link
Author

a34546 commented Oct 25, 2023

谢谢,我已经解决了,之前用最新的mysql镜像,修改配置,重启实例,一直不能正常显示columnNames,不清楚是哪里出现了问题。
现在换了个mysql8.0.1镜像重新部署,现在可以显示正常columnNames了

@a34546 a34546 closed this as completed Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants