一 unknown option '--skip-federated'
mysql 安裝或者啓動時,出錯 unknown option '--skip-federated'
解決的方法是:
1、vi /etc/my.cnf
#skip-federated 將此行註釋掉
即可。
2、或者編譯的時候加上如下參數:
--with-plugins=all
二 mysql 從同步故障
1.查看從狀態時(show slave status\G)
[ERROR] Slave SQL: Error 'Duplicate entry '1007-443786-0' for key
或者Error 'Table 'xxx' already exists'
選擇跳過
stop slave;
set global sql_slave_skip_counter=1; (1是指跳過一個錯誤)
slave start;
2.查看從狀態時(show slave status\G)
Last_Error: Query partially completed on the master (error on master: 1317) and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; . Query: 'delete from t_recordlist where trainingid = 101'
解決
mysql> stop slave;
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
mysql> start slave;
3.
啓動時,mysql日誌提示
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 268435456 bytes!
配置文件定義的innodb_log_file_size = 256M 與當前的文件大小不一致
可以忽略此錯誤
或者將當前的重命名,重啓mysql,重新按照配置文件的大小重新生成新的log
三 mysql啓動了,輸入mysql無法登錄,提示密碼錯誤
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
這種一般是rpm安裝的mysql
這種情況下要求主機名不能是localhost
否則安裝時會提示
ERROR: 1062 Duplicate entry 'localhost-' for key 1
100623 14:36:08 [ERROR] Aborting
100623 14:36:08 [Note] /usr/sbin/mysqld: Shutdown complete
Installation of system tables failed!
Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
雖然此時啓動是成功的,但是user表裏面是空的,所以導致無法驗證登錄
解決辦法就是將主機名改名,然後再裝rpm包
mysql 常見問題(待續)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
sql語法、關係建模
死瘦宅
2019-02-24 22:35:22
MySQL 事務、函數、觸發器、數據庫備份、權限管理
死瘦宅
2019-02-24 22:35:12
如何釋放已刪除的InnoDB磁盤空間
lvrenX
2019-02-24 13:04:33
MySQL数据库集群-PXC方案
wy53780
2020-04-23 13:55:07
《從0到1學習Flink》—— Flink 讀取 Kafka 數據批量寫入到 MySQL
zhisheng
2019-02-24 21:04:11
SpringBoot 填坑 (一) | CentOS7.4 環境下,表時間字段默認值設置失效
一個優秀的廢人
2019-02-24 15:33:55
mysql-存儲過程
雙子城
2019-02-24 13:43:57
jmeter學習指南之操作 mysql 數據庫
小強測試
2019-02-24 13:34:06
20190222全天的實驗
清歡難尋
2019-02-24 13:17:21
數據庫監控:zabbix(fpmmm)
AMGYM
2019-02-24 13:05:14
數據庫監控:nagios(check_mysql_health)
AMGYM
2019-02-24 13:05:14
MongoDB索引優化詳解
geekpy
2019-02-24 14:20:06
Sql server中一些Select檢索高級用法
wbzjacky
2019-02-24 13:12:37
將frm,myi,myd文件打包成sql文件
jason1982
2019-02-24 12:57:22