环境:mac 、docker、
mac14.4.1
Docker version 26.0.0, build 2ae903e
mysql-8
启动命令
docker run -dp 3306:3306 -v dockerspace/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=admin123456 --privileged=true --name mysql mysql:1.0.0 --lower_case_table_names=0
docker日志如下
2024-05-13 22:14:29 2024-05-13 14:14:29+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
2024-05-13 22:14:29 command was: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --lower_case_table_names=0 --verbose --help --log-bin-index=/tmp/tmp.MKdS9vKaLD
2024-05-13 22:14:29 2024-05-13T14:14:29.194198Z 0 [ERROR] [MY-010158] [Server] The server option 'lower_case_table_names' is configured to use case sensitive table names but the data directory is on a case-insensitive file system which is an unsupported combination. Please consider either using a case sensitive file system for your data directory or switching to a case-insensitive table name mode.
2024-05-13 22:14:29 2024-05-13T14:14:29.199002Z 0 [ERROR] [MY-010119] [Server] Aborting
然后一直在网上找解决方式,找了半天,都没解决。尝试了很多
后面突然看到 让禁止gRPC FUSE,开启 VirtioFS,然后我看到我本地还有一个 osxfs
然后我都试了下
使用VirtioF、gRPC FUSE,的错误如下
2024-05-13 22:35:57 2024-05-13 14:35:57+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started.
2024-05-13 22:35:57 2024-05-13 14:35:57+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
2024-05-13 22:35:57 command was: mysqld --lower_case_table_names=0 --verbose --help --log-bin-index=/tmp/tmp.jOH4DfVumO
2024-05-13 22:35:57 2024-05-13T14:35:57.327162Z 0 [ERROR] [MY-010158] [Server] The server option 'lower_case_table_names' is configured to use case sensitive table names but the data directory is on a case-insensitive file system which is an unsupported combination. Please consider either using a case sensitive file system for your data directory or switching to a case-insensitive table name mode.
2024-05-13 22:35:57 2024-05-13T14:35:57.332357Z 0 [ERROR] [MY-010119] [Server] Aborting
使用 osxfs 能正常启动
2024-05-13 22:49:48 2024-05-13 14:49:48+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started.
2024-05-13 22:49:49 2024-05-13 14:49:49+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-05-13 22:49:49 2024-05-13 14:49:49+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started.
2024-05-13 22:49:50 2024-05-13T14:49:50.186566Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28) starting as process 1
2024-05-13 22:49:50 2024-05-13T14:49:50.270347Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-05-13 22:49:51 2024-05-13T14:49:51.154347Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-05-13 22:49:51 2024-05-13T14:49:51.622254Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2024-05-13 22:49:51 2024-05-13T14:49:51.628395Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2024-05-13 22:49:51 2024-05-13T14:49:51.686893Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-05-13 22:49:51 2024-05-13T14:49:51.687326Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-05-13 22:49:51 2024-05-13T14:49:51.695566Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-05-13 22:49:51 2024-05-13T14:49:51.754061Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.28' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2024-05-13 22:49:51 2024-05-13T14:49:51.754728Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock