【发布时间】:2018-10-22 21:27:25
【问题描述】:
我正在尝试在 centos 7 上设置一个 mysql 8 intsall 并且玩得很开心。我们有一些旧版软件通过小写名称连接到旧的 mysql 数据库,我想将其转移到这个新设置中。
我在正确设置此配置时遇到问题,我不知道要设置什么文件或何时设置它,甚至不知道在什么用户/权限级别下设置它。
当我在 /etc/my.cnf 中将它设置为 1 然后尝试启动 mysqld 我得到:
[ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('0') and data dictionary ('1').
我已经重新安装了 mysql,认为重新开始对我的 /etc/my.cnf 有以下设置:
lower_case_table_names=1
default_authentication_plugin=mysql_native_password
bind-address=REDACTED
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
安装 mysql-server 并将 .cnf 文件复制到它的位置后,我运行:
mysqld --defaults-file=/etc/my.cnf
并受到欢迎:
2018-10-22T21:30:27.826322Z 0 [Warning] [MY-010139] [Server] Changed limits: max_open_files: 1024 (requested 8161)
2018-10-22T21:30:27.826414Z 0 [Warning] [MY-010142] [Server] Changed limits: table_open_cache: 431 (requested 4000)
2018-10-22T21:30:28.057606Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/be-db-10.lower-test
2018-10-22T21:30:28.057668Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.13) starting as process 27077
2018-10-22T21:30:28.060609Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/be-db-10.lower-test
2018-10-22T21:30:28.060628Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/be-db-10.lower-test
2018-10-22T21:30:28.061062Z 0 [ERROR] [MY-010187] [Server] Could not open file '/var/log/mysqld.log' for error logging: Permission denied
2018-10-22T21:30:28.061098Z 0 [ERROR] [MY-010119] [Server] Aborting
我假设在某些时候我彻底搞砸了一些权限,或者 mysql 没有被完全删除?
【问题讨论】: