修改CentOS6.5主机名引起MySQL5.6.35服务问题
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了修改CentOS6.5主机名引起MySQL5.6.35服务问题,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含17342字,纯文字阅读大概需要25分钟。
内容图文
***** 修改CentOS6.5默认主机名 ******/ 1、备份系统网络配置文件 [root@localhost ~]# cp /etc/sysconfig/network /etc/sysconfig/network.`date +%Y%m%d.%H%M%S` 2、备份系统网络配置文件 [root@localhost ~]# vim /etc/sysconfig/network 修改HOSTNAME为我们想要的名字VMUest 3、备份hosts文件 [root@localhost ~]# cp /etc/hosts /etc/hosts.`date +%Y%m%d.%H%M%S` 4、修改hosts文件 [root@localhost ~]# vim /etc/hosts 在127.0.0.1后添加主机名VMUest(注意空格) 5、修改上面两个文件后,需重启才永久生效。使用hostname可临时生效 [root@localhost ~]# hostname VMUest我这里没有重启虚拟机,使用命令临时生效。退出后重新登录主机名已更改为VMUest。本以为大功告成,手贱查看下mysql服务状态
[root@VMUest ~]# whereis mysql mysql: /usr/bin/mysql /usr/local/mysql [root@VMUest ~]# cd /usr/local/mysql [root@VMUest mysql]# ll total 72 drwxr-xr-x. 2 mysql mysql 4096 Mar 10 13:13 bin -rw-r--r--. 1 mysql mysql 17987 Nov 28 21:36 COPYING drwxr-xr-x. 6 mysql mysql 4096 Mar 12 09:01 data drwxr-xr-x. 2 mysql mysql 4096 Mar 10 13:13 docs drwxr-xr-x. 3 mysql mysql 4096 Mar 10 13:13 include drwxr-xr-x. 3 mysql mysql 4096 Mar 10 13:13 lib drwxr-xr-x. 4 mysql mysql 4096 Mar 10 13:13 man -rw-r--r--. 1 root root 1123 Mar 10 14:31 my.cnf srwxrwxrwx. 1 mysql mysql 0 Mar 12 09:01 mysql.sock drwxr-xr-x. 10 mysql mysql 4096 Mar 10 13:14 mysql-test -rw-r--r--. 1 mysql mysql 2496 Nov 28 21:36 README drwxr-xr-x. 2 mysql mysql 4096 Mar 10 13:13 scripts drwxr-xr-x. 28 mysql mysql 4096 Mar 10 13:14 share drwxr-xr-x. 4 mysql mysql 4096 Mar 10 13:14 sql-bench drwxr-xr-x. 2 mysql mysql 4096 Mar 10 13:14 support-files [root@VMUest mysql]# cd data [root@VMUest data]# ll total 176188 -rw-rw----. 1 mysql mysql 56 Mar 10 14:01 auto.cnf -rw-rw----. 1 mysql mysql 79691776 Mar 12 09:01 ibdata1 -rw-rw----. 1 mysql mysql 50331648 Mar 12 09:01 ib_logfile0 -rw-rw----. 1 mysql mysql 50331648 Mar 10 13:52 ib_logfile1 -rw-rw----. 1 mysql mysql 28768 Mar 12 10:19 localhost.localdomain.err -rw-rw----. 1 mysql mysql 5 Mar 12 09:01 localhost.localdomain.pid drwx------. 2 mysql mysql 4096 Mar 10 13:52 mysql drwx------. 2 mysql mysql 4096 Mar 10 13:52 performance_schema drwx------. 2 mysql mysql 4096 Mar 10 16:38 sakila drwxr-xr-x. 2 mysql mysql 4096 Mar 10 17:36 test [root@VMUest data]# service mysql status ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists [root@VMUest data]# service mysql stop ERROR! MySQL server PID file could not be found! [root@VMUest data]# service mysql restart ERROR! MySQL server PID file could not be found! Starting MySQL.Logging to ‘/usr/local/mysql/data/VMUest.err‘. .............................................................................................................. ERROR! The server quit without updating PID file (/usr/local/mysql/data/VMUest.pid).
此时还可以操作MySQL数据库(查询数据、创建表格都正常)。搜索关键字"ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists",给出的解决方案是删除文件/var/lock/subsys/mysql,重新启动如果依旧出错考虑删除pid file。
[root@VMUest data]# rm -f /var/lock/subsys/mysql [root@VMUest data]# service mysql status ERROR! MySQL is not running [root@VMUest data]# service mysql start Starting MySQL...................................................................................................... ERROR! The server quit without updating PID file (/usr/local/mysql/data/VMUest.pid). [root@VMUest data]# rm -f localhost.localdomain.pid [root@VMUest data]# service mysql start Starting MySQL..................................................................................................... ERROR! The server quit without updating PID file (/usr/local/mysql/data/VMUest.pid).
到此时才想起去查看错误日志(.err)
2017-03-12 11:04:49 6113 [Note] Plugin ‘FEDERATED‘ is disabled. 2017-03-12 11:04:49 6113 [Note] InnoDB: Using atomics to ref count buffer pool pages 2017-03-12 11:04:49 6113 [Note] InnoDB: The InnoDB memory heap is disabled 2017-03-12 11:04:49 6113 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2017-03-12 11:04:49 6113 [Note] InnoDB: Memory barrier is not used 2017-03-12 11:04:49 6113 [Note] InnoDB: Compressed tables use zlib 1.2.3 2017-03-12 11:04:49 6113 [Note] InnoDB: Not using CPU crc32 instructions 2017-03-12 11:04:49 6113 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2017-03-12 11:04:49 6113 [Note] InnoDB: Completed initialization of buffer pool 2017-03-12 11:04:50 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:50 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:50 6113 [Note] InnoDB: Retrying to lock the first data file 2017-03-12 11:04:51 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:51 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:52 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:52 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:53 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:53 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:54 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:54 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:55 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:55 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:56 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:56 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:57 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:57 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:58 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:58 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:04:59 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:04:59 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:00 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:00 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:01 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:01 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:02 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:02 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:03 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:03 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:04 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:04 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:05 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:05 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:06 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:06 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:07 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:07 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:08 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:08 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:09 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:09 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:10 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:10 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:11 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:11 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:12 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:12 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:13 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:13 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:14 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:14 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:15 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:15 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:16 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:16 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:17 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:17 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:18 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:18 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:19 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:19 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:20 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:20 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:21 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:21 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:22 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:22 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:23 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:23 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:24 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:24 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:25 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:25 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:26 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:26 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:27 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:27 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:28 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:28 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:29 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:29 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:30 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:30 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:31 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:31 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:32 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:32 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:33 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:33 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:34 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:34 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:35 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:35 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:36 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:36 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:37 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:37 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:38 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:38 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:39 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:39 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:40 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:40 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:41 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:41 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:42 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:42 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:43 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:43 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:44 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:44 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:45 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:45 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:46 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:46 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:47 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:47 6113 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2017-03-12 11:05:48 6113 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2017-03-12 11:05:48 6113 [Note] InnoDB: Check that you do<span style="color: 本文系统来源:http://www.cnblogs.com/ShanFish/p/6537470.html
内容总结
以上是互联网集市为您收集整理的修改CentOS6.5主机名引起MySQL5.6.35服务问题全部内容,希望文章能够帮你解决修改CentOS6.5主机名引起MySQL5.6.35服务问题所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。