1. ERROR 2061 (HY000): Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.
創(chuàng)新互聯建站專注于成都做網站、網站制作、網頁設計、網站制作、網站開發(fā)。公司秉持“客戶至上,用心服務”的宗旨,從客戶的利益和觀點出發(fā),讓客戶在網絡營銷中找到自己的駐足之地。尊重和關懷每一位客戶,用嚴謹的態(tài)度對待客戶,用專業(yè)的服務創(chuàng)造價值,成為客戶值得信賴的朋友,為客戶解除后顧之憂。
【分析】MySQL8默認使用插件caching_sha2_password,有些client連接報這個錯誤,需要拿到server的public key來加密password。
【解決】加參數可以解決:--get-server-public-key
mysql -u sha2user -p --get-server-public-key。做主從復制的時候也會碰到這種情況,加餐get_master_public_key=1;
change master to
master_host='192.168.2.135',
master_port=3306,
master_user='repl_user',
master_password='123456',
master_auto_position=1 ,
get_master_public_key=1;
2.Multiple files found for the same tablespace ID:
2019-10-22T15:27:22.848885+08:00 1 [ERROR] [MY-012209] [InnoDB] Multiple files found for the same tablespace ID:
2019-10-22T15:27:22.848904+08:00 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 1 = ['sys/sys_config.ibd', 'sys/sys_config.ibd']
2019-10-22T15:27:22.848915+08:00 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 15 = ['test/t.ibd', 'test/t.ibd']
2019-10-22T15:27:22.848922+08:00 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 4294967278 = ['undo_002', 'undo_002']
2019-10-22T15:27:22.848932+08:00 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 4294967279 = ['undo_001', 'undo_001']
2019-10-22T15:27:22.848939+08:00 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 4294967294 = ['mysql.ibd', 'mysql.ibd']
2019-10-22T15:27:22.848952+08:00 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Failed, retry may succeed.
2019-10-22T15:27:22.849080+08:00 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2019-10-22T15:27:22.849297+08:00 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
【解答】啟動文件加參數innodb_directories="/data/mysqldata;"