mysql 常见问题(待续)
2010-06-27 15:50
281 查看
一 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 安装或者启动时,出错 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建表规范与常见问题
- mysql锁3.常见问题
- MySQL常见问题汇总(原创)
- Django 连接Mysql的方法及常见问题
- MySQL安装教程及其常见问题
- linux下mysql常见问题,个人实践
- ThinkPHP框架搭建及常见问题(XAMPP安装失败、Apache/MySQL启动失败)
- mysql锁常见问题
- mysql常见问题整理
- 在Windows上安装Python+MySQL 的常见问题及解决方法
- MySQL用户连接常见问题
- python 3.6安装mysql以及不常见问题
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql在查询中常见问题汇总
- Mysql配置参数常见问题
- MySQL常见问题分析及解决方法
- Mysql 常见问题汇总:
- Win7 64位 mysql 5.7下载安装常见问题小结
- Mysql实战常见问题汇总
- Mysql存储程序、函数、触发程序及复制:常见问题