业界良心之拯救mysql

来源:互联网 发布:手机慢动作视频软件 编辑:程序博客网 时间:2024/04/27 19:55

我的mysql5.5出了问题, 我忙了一天去解决它,心情很不好,因为我花了一天时间去解决一个工具的问题。百度了一下, 100000个搜索结果可能只有那一个版本,心情更不好了,终于明白为什么有人说百度是程序员的坟墓。 

结果是我在stackoverflow上找到了答案,上面的大神们,真心是业界良知。


回到这个问题上,我修改了my.cnf文件,应该是配置错误了,然后mysqld.sock文件消失,我不太了解其中的问题,在这里就不胡扯了,重新安装报错是

Unable to set password for the MySQL "root" An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server. You should check the account's password after the package installation. Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more information. 

运行或启动mysql报错:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'


最后的解决办法是:

1.dpkg --remove mysql-server-5.5or justdpkg --remove mysql-server2.sudo apt-get purge -f mysql-server mysql-common3.sudo apt-get install mysql-server mysql-common



其它可能有用的方法:

sudo apt-get remove apparmor and then re-attempt the installation with mysql-common package:sudo apt-get install mysql-common mysql-server


原创粉丝点击