VMware加载其他宿主机上的虚拟机以后,mySQL没法启动。如何解决?
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了VMware加载其他宿主机上的虚拟机以后,mySQL没法启动。如何解决?,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3316字,纯文字阅读大概需要5分钟。
内容图文
![VMware加载其他宿主机上的虚拟机以后,mySQL没法启动。如何解决?](/upload/InfoBanner/zyjiaocheng/489/f532ab02526c4ae095845566448705e0.jpg)
IP地址已经修改过来,与宿主机在一个网段(Bridge模式)。但是,MySQL无法连接上。
[root@localhost ~]# mysql
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)
[root@localhost ~]# ps -A | grep -i mysql
[root@localhost ~]# service mysql start
Redirecting to /bin/systemctl start mysql.service
Failed to start mysql.service: Unit not found.
[root@localhost ~]# ps -ef|grep mysql
root 4560 4126 0 20:40 pts/0 00:00:00 grep --color=auto mysql
[root@localhost ~]# /etc/init.d/mysql start
bash: /etc/init.d/mysql: 没有那个文件或目录
在/etc/rc.d/init.d里面没有mysqld,
[root@localhost ~]# /usr/bin/mysqladmin version
/usr/bin/mysqladmin: connect to server at ‘localhost‘ failed
error: ‘Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)‘
Check that mysqld is running and that the socket: ‘/var/lib/mysql/mysql.sock‘ exists!
[root@localhost ~]# rpm -qa | grep -i mysql
qt5-qtbase-mysql-5.6.1-10.el7.x86_64
qt3-MySQL-3.3.8b-51.el7.x86_64
akonadi-mysql-1.9.2-4.el7.x86_64
perl-DBD-MySQL-4.023-5.el7.x86_64
qt-mysql-4.8.5-13.el7.x86_64
MySQL-python-1.2.5-1.el7.x86_64
mysql: /usr/bin/mysql /usr/lib/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@localhost ~]# find / -name mysql.sock
[root@localhost ~]# touch /var/lib/mysql/mysql.sock
[root@localhost ~]# service mysql startRedirecting to /bin/systemctl start mysql.service
Failed to start mysql.service: Unit not found.
[root@localhost ~]# systemctl start mysql.service
Failed to start mysql.service: Unit not found. [root@localhost ~]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
Unit mysqld.service could not be found.
[root@localhost ~]# service mysqld stop
Redirecting to /bin/systemctl stop mysqld.service
Failed to stop mysqld.service: Unit mysqld.service not loaded.
[root@localhost ~]# rm -fr /var/lib/mysql/*
[root@localhost ~]# rm /var/lock/subsys/mysqld
rm: 无法删除"/var/lock/subsys/mysqld": 没有那个文件或目录
[root@localhost ~]# killall mysqld
mysqld: no process found
[root@localhost ~]# service mysql start
Redirecting to /bin/systemctl start mysql.service
Failed to start mysql.service: Unit not found.
看了很多帖子,实际都不是这个问题。最后这个帖子解决了,老外遇到的。还是外国的帖子有价值些,内容广些,原创多。Google很重要。
http://www.cnblogs.com/aleafo/p/4946037.html
# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 11 Server version: 5.5.37-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. MariaDB [(none)]>
So the 3 steps to enable and run MariaDB are as follows, assuming it was previously installed during the initial setup for the system or with yum install mariadb mariadb-server
:
systemctl start mariadb.service
systemctl enable mariadb.service
mysql_secure_installation
VMware加载其他宿主机上的虚拟机以后,mySQL没法启动。如何解决?
标签:rect com ram perl nbsp x86 div cti 解决
本文系统来源:http://www.cnblogs.com/daohan/p/7353050.html
内容总结
以上是互联网集市为您收集整理的VMware加载其他宿主机上的虚拟机以后,mySQL没法启动。如何解决?全部内容,希望文章能够帮你解决VMware加载其他宿主机上的虚拟机以后,mySQL没法启动。如何解决?所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。