Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test


2021-03-15T03:48:31.127387Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.23)  MySQL Community Server - GPL.
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2021-03-15T03:49:07.154888Z 0 [Warning] [MY-010091] [Server] Can't create test file /data/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2021-03-15T03:49:07.154978Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23) starting as process 1580
2021-03-15T03:49:07.158908Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2021-03-15T03:49:07.158917Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2021-03-15T03:49:07.161942Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-03-15T03:49:07.162165Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.23)  MySQL Community Server - GPL.

 

解決辦法

 

selinux,如果你恰好要操作的這台機器開着selinux,它確實能夠使你的mysql無法在新目標位置進行mysql_install_db的操作,並爆出標題所示的警告。

暫時關閉selinux,

setenforce 0

  但最好使用一個永久方法,以便在重啟后繼續不要這貨。

  修改/etc/selinux/config文件中設置SELINUX=disabled ,然后重啟或等待下次重啟


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM