mysql 帮助手册 以及 warning: World-writable config file 以及 ERROR 1840 (HY000) at line 24:
1.
mysql --help
2.报错
报错Warning: World-writable config file
http://www.jb51.net/article/99027.htm
问题分析
在关闭数据库的命令发现mysql关不了,提示Warning: World-writable config file '/etc/my.cnf' is ignored
,大概意思是权限全局可写,任何一个用户都可以写。mysql担心这种文件被其他用户恶意修改,所以忽略掉这个配置文件。这样mysql无法关闭。
下面看下整个过程
重启MySQL
1
2
3
4
|
[root@ttlsa ~] # service mysqld stop Warning: World-writable config file '/etc/my.cnf' is ignored Warning: World-writable config file '/etc/my.cnf' is ignored MySQL manager or server PID file could not be found![FAILED] |
可以看到mysql停止不了
查看my.cnf的权限
1
2
|
[root@ttlsa ~] # ls -l /etc/my.cnf -rwxrwxrwx 1 root root 4878 Jul 30 11:31 /etc/my .cnf |
权限777,任何一个用户都可以改my.cnf
,存在很大的安全隐患.
修复MySQL问题
1
|
[root@ttlsa ~] # chmod 644 /etc/my.cnf |
my.cnf设置为用户可读写,其他用户不可写.
关闭MySQL
1
2
|
[root@ttlsa ~] # service mysqld stop Shutting down MySQL..[ OK ] |
MySQL关闭成功. 问题很简单
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流。
############3
http://www.bubuko.com/infodetail-2378774.html
RROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty
今天在做库迁移的时候,因为涉及从集群迁移到单实例,遇到一些问题,记录了解决过程
当前GTID_EXECUTED参数已经有值,而从集群倒出来的dump文件中包含了SET @@GLOBAL.GTID_PURGED的操作
mysql> show master status;
mysql> show slave status;
解决方法:
方法一:reset mater
这个操作可以将当前库的GTID_EXECUTED值置空
方法二:--set-gtid-purged=off
在dump导出时,添加--set-gtid-purged=off参数,避免将gtid信息导出
mysqldump -uroot -p --set-gtid-purged=off -d sso > sso1.sql
在添加参数前的导出文件
添加参数之后的文件
相关文章
- MySQL 从 5.5 升级到 5.6,启动时报错 [ERROR] Plugin 'InnoDB' init function returned error
- 【MySql】mysql 表的常规管理
- mysql 内外链接
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql 启动不了
- loadrunner12.55:关联回放失败Action.c(16): Error: C interpreter run time error: Action.c (16): Error -- memory violation : Exception ACCESS_VIOLATION received.,自动关联生成函数web_reg_save_param_attrib()
- 连接Mysql提示Can’t connect to local MySQL server through socket的解决方法
- [root@master mysql]# mysql -uroot -pjsb ERROR 2002 (HY000): Can't connect to local MySQL server thro
- mysql全局权限账户%登录不上ERROR 1045 (28000): Access denied for user 'mhz'@'localhost' (using password: YES)
- 数据库基础之Mysql(3)mysql删除历史binlog
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
- MySQL中的char和varchar&mysql中varchar能存多少汉字、数字,以及varchar(100)和varchar(10)的区别
- [FAQ] web3js, Error: [number-to-bn] while converting number 0.1 to BN.js instance, error: invalid number value
- 成功解决ParserError: Error tokenizing data. C error: Expected 2 fields in line 53, saw 3
- 【已解决】ERROR 1290 (HY000): Unknown error 1290
- 已解决nltk.download(‘stopwords‘) [nltk_data] Error loading stopwords: <urlopen error [Errno 11004] [nlt
- 全网多种方法解决You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
- 详解MySQL information_schema数据库常用的表信息以及各表对应的字段信息;以及如何登录mysql和创建视图
- ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 45, found 43. Created with MySQL 5
- MySQL中同一时候存在创建和上次更新时间戳字段解决方法浅析
- MySQL-mysql 8.0.11安装教程 windows
- Mysql报错:Can't connect to local MySQL server through socket '/tmp/mysql.sock'
- MySQL 分区表
- MySQL 配置, 避坑 sqlyog连接mysql错误码2058
- Mycat启动正常但无法连接ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql
- 【Mysql异构实时同步Oracle】OGG12异构同步mysql到oracle(windows mysql实时同步数据到linux oracle)详细文档