Hướng dẫn mysql different lower_case_table_names settings for server ( 2 ) and data dictionary ( 0 ) - mysql cài đặt low_case_table_names khác nhau cho máy chủ (2) và từ điển dữ liệu (0)

Description:

Hành vi mong đợi:

Sau khi cài đặt Laradock và thực thi: ________ 25 Tất cả các thùng chứa Docker sẽ chạy tốt.

Thông tin bối cảnh:

Đầu ra của

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
6

Client: Docker Engine - Community
 Cloud integration  0.1.18
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46d9d
 Built:             Wed Sep 16 16:58:31 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.13
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       4484c46d9d
  Built:            Wed Sep 16 17:07:04 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.3.7
  GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Đầu ra của

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
7

docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020

Các bước để tái tạo vấn đề:

Sao chép repo và chạy

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
5 MySQL thoát ra với mã (0)

Khi tôi cố gắng khởi động lại container, tôi nhận được thông báo sau:

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.

StackTrace & thông tin bổ sung:

Tôi đã thử thêm

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
9 để tệp docker-compose của mình, nhưng điều đó dường như không giúp ích gì.

MySQL gặp sự cố với:

mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
mysql_1                |        2020-10-01T10:21:28.547104Z 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.
mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting

Tôi vừa tổng hợp phiên bản MySQL 8.0.12 trong Ubuntu 16.0.4.

Sau khi làm theo các hướng dẫn trong trang web và tạo tệp My.cnf sau:

[mysqld]
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
port=3306
log-error=/usr/local/mysql/data/localhost.localdomain.err
user=mysql
secure_file_priv=/usr/local/mysql/mysql-files
local_infile=OFF

log_error = /var/log/mysql/error.log

# Remove case sensitive in table names
lower_case_table_names=1

Tôi nhận được lỗi sau đây:

2018-08-11T19:45:06.461585Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').

Tôi nên thay đổi điều gì để từ điển dữ liệu được căn chỉnh với cài đặt máy chủ?

Hỏi ngày 11 tháng 8 năm 2018 lúc 19:53Aug 11, 2018 at 19:53

Hướng dẫn mysql different lower_case_table_names settings for server ( 2 ) and data dictionary ( 0 ) - mysql cài đặt low_case_table_names khác nhau cho máy chủ (2) và từ điển dữ liệu (0)

Asukaasukaasuka

2.1293 huy hiệu vàng21 Huy hiệu bạc24 Huy hiệu đồng3 gold badges21 silver badges24 bronze badges

2

Cho đến nay, tôi có thể làm cho nó hoạt động với một cách giải quyết (ban đầu tôi đã đăng trên Askubuntu): bằng cách khởi tạo lại MySQL với giá trị mới cho

mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
mysql_1                |        2020-10-01T10:21:28.547104Z 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.
mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
0 sau khi cài đặt. Các bước sau đây áp dụng cho một cài đặt mới. Nếu bạn đã có dữ liệu trong cơ sở dữ liệu, hãy xuất nó trước để nhập lại sau:

  1. Cài đặt MySQL:
    sudo apt-get update    
    sudo apt-get install mysql-server -y
    
  2. Dừng dịch vụ MySQL:
    sudo service mysql stop
    
  3. Xóa thư mục dữ liệu MySQL:
    sudo rm -rf /var/lib/mysql
    
  4. Tái tạo thư mục dữ liệu MySQL (vâng, không đủ để xóa nội dung của nó):
    sudo mkdir /var/lib/mysql    
    sudo chown mysql:mysql /var/lib/mysql
    sudo chmod 700 /var/lib/mysql
    
  5. Thêm
    mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
    mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
    mysql_1                |        2020-10-01T10:21:28.547104Z 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.
    mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
    
    1 vào phần
    mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
    mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
    mysql_1                |        2020-10-01T10:21:28.547104Z 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.
    mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
    
    2 trong
    mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
    mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
    mysql_1                |        2020-10-01T10:21:28.547104Z 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.
    mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
    
    3.
  6. Tái tạo lại MySQL với
    mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
    mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
    mysql_1                |        2020-10-01T10:21:28.547104Z 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.
    mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
    
    4:
    docker-compose version 1.27.4, build 40524192
    docker-py version: 4.3.1
    CPython version: 3.7.7
    OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
    
    0
  7. Bắt đầu dịch vụ MySQL:
    docker-compose version 1.27.4, build 40524192
    docker-py version: 4.3.1
    CPython version: 3.7.7
    OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
    
    1
  8. Truy xuất mật khẩu được tạo mới cho người dùng MySQL
    mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
    mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
    mysql_1                |        2020-10-01T10:21:28.547104Z 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.
    mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
    
    5:
    docker-compose version 1.27.4, build 40524192
    docker-py version: 4.3.1
    CPython version: 3.7.7
    OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
    
    2
  9. Thay đổi mật khẩu của người dùng MySQL
    mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
    mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
    mysql_1                |        2020-10-01T10:21:28.547104Z 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.
    mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
    
    5 bằng cách:
    docker-compose version 1.27.4, build 40524192
    docker-py version: 4.3.1
    CPython version: 3.7.7
    OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
    
    3 và thực thi:
    docker-compose version 1.27.4, build 40524192
    docker-py version: 4.3.1
    CPython version: 3.7.7
    OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
    
    4 sau đó hoặc bằng cách gọi tập lệnh "cứng" bằng mọi cách:
    docker-compose version 1.27.4, build 40524192
    docker-py version: 4.3.1
    CPython version: 3.7.7
    OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
    
    5

Sau đó, bạn có thể xác minh cài đặt

mysql_1                | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
mysql_1                |        command was: mysqld --lower_case_table_names=0 --verbose --help
mysql_1                |        2020-10-01T10:21:28.547104Z 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.
mysql_1                | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
0 bằng cách nhập vỏ MySQL:

docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
3

và thực thi:

docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
7

Đầu ra dự kiến:

docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
8

Đã trả lời ngày 24 tháng 7 năm 2020 lúc 8:25Jul 24, 2020 at 8:25

Hướng dẫn mysql different lower_case_table_names settings for server ( 2 ) and data dictionary ( 0 ) - mysql cài đặt low_case_table_names khác nhau cho máy chủ (2) và từ điển dữ liệu (0)

StackProtectorStackProtectorstackprotector

8.2174 Huy hiệu vàng23 Huy hiệu bạc49 Huy hiệu đồng4 gold badges23 silver badges49 bronze badges

2

Theo liên kết này, Lower_case_table_names phải được đặt cùng với tùy chọn - -retialize.

Đã trả lời ngày 11 tháng 8 năm 2018 lúc 21:47Aug 11, 2018 at 21:47

Hướng dẫn mysql different lower_case_table_names settings for server ( 2 ) and data dictionary ( 0 ) - mysql cài đặt low_case_table_names khác nhau cho máy chủ (2) và từ điển dữ liệu (0)

Praveen Epraveen ePraveen E

8277 Huy hiệu bạc12 Huy hiệu Đồng7 silver badges12 bronze badges

6

Để khắc phục sự cố này,

  1. Chỉ cần sao lưu lược đồ DB hiện có bằng lệnh sau bên trong thư mục bin (/usr/local/mysql/bin)../mysqldump -uroot -p password > dump.sql

  2. Khi bản sao lưu được thực hiện, hãy xóa thư mục dữ liệu hiện có trong nhà mysql (/usr/local/mysql/)rm -rf data

  3. Bây giờ hãy thêm cấu hình là "lower_case_table_names = 1" trong my.cnf trong phần MySQLD (/etc/my.cnf)lower_case_table_names=1" in my.cnf under MYSQLD section (/etc/my.cnf)

  4. Bây giờ khởi tạo thư mục dữ liệu bằng cách sử dụng lệnh sau bên trong thư mục bin (/usr/local/mysql/bin)

Cho chế độ an toàn ./mysqld--defaults-file =/etc ./mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql --console

Đối với chế độ không an toàn. ./mysqld --defaults-file=/etc/my.cnf --initialize-insecure --user=mysql --console

  1. Khi thư mục dữ liệu được khởi tạo, đối với chế độ không an toàn, hãy lặp lại cài đặt và đối với chế độ an toàn, hãy sử dụng mật khẩu gốc được khởi tạo trong thời gian chạy khởi tạo thư mục dữ liệu.For Insecure mode repeat the Installation again and For Secure mode use the root password which is initialized during the run time of data directory Initialization.

  2. Bây giờ nhập tệp kết xuất hiện có bên trong máy chủ MySQL bằng thư mục bên trong (/usr/local/mysql/bin)

./mysql -uroot -p mật khẩu

Đã trả lời ngày 7 tháng 6 năm 2019 lúc 4:07Jun 7, 2019 at 4:07

Hướng dẫn mysql different lower_case_table_names settings for server ( 2 ) and data dictionary ( 0 ) - mysql cài đặt low_case_table_names khác nhau cho máy chủ (2) và từ điển dữ liệu (0)

Nếu bất cứ ai gặp phải vấn đề này ngay bây giờ, nếu bạn đã khởi tạo MySQL, có nghĩa là bạn đã có nó và chạy và sau đó lỗi này đã xảy ra, chỉ cần nhận xét dòng này trong tệp My.ini.

docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
9

Đã trả lời ngày 9 tháng 6 năm 2020 lúc 10:10Jun 9, 2020 at 10:10

0

Cách tốt nhất để ngăn chặn vấn đề này là: Lúc đầu, hãy thêmprevent this problem is :At first add

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
0

Sau đó bắt đầu dịch vụ MySQL lần đầu tiên.

Nhưng dù sao nếu bạn đã khởi động máy chủ, để giải quyết vấn đề của bạn:

1.Stop mysql:

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
1

2. Thư mục dữ liệu hoặc thay đổi mặc định, sau đây là để cài đặt mới, nếu bạn có dữ liệu trong cơ sở dữ liệu của mình sao lưu chúng trướcBACK UP them beforehand

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
2

3.Insert Lower_case_table_names = 1 trong My.cnf:

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
0

4. khởi động một lần nữa

mysql_1                | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1                | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1                | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1                | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1                | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1                | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.
4

Đã trả lời ngày 5 tháng 8 năm 2019 lúc 19:45Aug 5, 2019 at 19:45

BehdadbehdadBehdad

1743 Huy hiệu bạc12 Huy hiệu Đồng3 silver badges12 bronze badges

2

Làm cách nào để làm cho trường hợp mysql

Hiển thị hoạt động trên bài đăng này ...
Xác định vị trí tệp tại /etc/mysql/my.cnf ..
Chỉnh sửa tệp bằng cách thêm các dòng sau: [mysqld] lowd_case_table_names = 1 ..
sudo /etc/init.d/mysql khởi động lại ..
Chạy các biến root -p mysqladmin -U |Bảng grep để kiểm tra xem lowdy_case_table_names bây giờ là 1 ..

Lower_case_table_names trong MySQL là gì?

Sử dụng Lower_Case_Table_Names = 0 trên Unix và Lower_Case_Table_Names = 2 trên Windows.Điều này bảo tồn thư của cơ sở dữ liệu và tên bảng.Nhược điểm của điều này là bạn phải đảm bảo rằng các câu lệnh của bạn luôn đề cập đến cơ sở dữ liệu và tên bảng của bạn với chữ cái chính xác trên Windows.preserves the lettercase of database and table names. The disadvantage of this is that you must ensure that your statements always refer to your database and table names with the correct lettercase on Windows.

Là trường hợp mysql

Theo mặc định, nó phụ thuộc vào hệ điều hành và độ nhạy trường hợp của nó.Điều này có nghĩa là MySQL không nhạy cảm trường hợp trong Windows và MacOS, trong khi nó nhạy cảm với trường hợp trong hầu hết các hệ thống Linux.Tuy nhiên, bạn có thể thay đổi hành vi bằng cách thay đổi đối chiếu.