Ubuntu14.04 安装MySQL 及Can‘t connect to local MYSQL server through socket ’/var/run/mysqld/mysqld.sock‘ (2)

今天安装Mysql 按着这个①http://www.cnblogs.com/zhuyp1015/p/3561470.html来安装,却出现了这个问题

卸载又从安装还是有问题,

搜了好久在stackoverflow找到个链接

http://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq

②http://www.cyberciti.biz/tips/recover-mysql-root-password.html

记得之后数据库密码变为下面:

NEW-ROOT-PASSWORD

你也可以重新设置密码

其实只要按照①②两个参考着安装就可以使用MySQL啦~~~~~~~~~~~~~

完全卸载http://blog.csdn.net/my2010sam/article/details/18703249

时间: 2024-10-14 05:51:57

Ubuntu14.04 安装MySQL 及Can‘t connect to local MYSQL server through socket ’/var/run/mysqld/mysqld.sock‘ (2)的相关文章

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

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 方案1. 1.#ps -A|grep mysql 显示类似: 1829 ?        00:00:00 mysqld_safe   1876 ?        00:00:31 mysqld 2.#kill -9 1829 3.#kill -9 1876 4.#/etc/init.d/

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

今天mysql不知道犯啥病,root登录的时候一直报这个错误. 在国内网站找了找,没什么合适的 答案,在stackoverflow和ubuntu的一个社区上找到了答案,搞定了,但是没太看懂,记录一下,以后再翻. That said, Here is what I did/ found out: 1. You don't have to change the tmp directory in the my.cnf file. Even adding a second directory, chan

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'解决

安装上mysql后,报 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock',试了网上的方法都没有用,于是打开/etc/my.cnf查看. 看到这么一段: # The MySQL server 26 [mysqld] 27 port            = 3306 28 socket          = /tmp/mysql.sock 29 skip-external-locking

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

今天在ubuntu上连接mysql数据库时,遇到一个小问题 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 第一次使用时还可以使用的,突然就不好了,不知道是不是没吃药, 先查看数据库状态: [email protected]:~$ sudo /etc/init.d/mysql status (因为我使用的是普通用户,所以要sudo一下) 1.如果出现: [email prot

mysql之ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'解决方法

LAMPP安装完成之后,mysql -u root -p连不上,报这个错误: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' 在mysql的配置文件里,/opt/lampp/etc/my.cnf, 发现了这样的配置: [java] <SPAN style="FONT-SIZE: 24px"># The following

Can&#39;t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock‘ (2)解决思路

首先说明一下mysql.sock文件的作用: 连接mysql有两种方式,第一种是TCP/IP,第二种就是直接使用unix domain socket,它比TCP/IP块. mysql.sock是在mysql-server和client在同一服务器上时,发起本地连接时可用,而无需定义-h参数指定具体的IP.mysql.sock是随每次mysql server启动时生成,通常配置参数是将mysql.sock生成在/tmp/目录下.即在/etc/my.cnf文件中指定socket=/tmp/mysql

连接Mysql提示Can’t connect to local MySQL server through socket的解决方法

mysql,Mysqldump,Mysqladmin,php连接mysql服务常会提示下面错误: 1 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 这是由于修改mysql服务的了socket文件mysql.sock位置,而导致无法通过mysql socket文件连接到mysql服务引起的,具体解决办法如下:1.查看mysql服务的sock

MYSQL错误Can&#39;t connect to local MySQL server through socket &#39;/var/lib/mysql/mysq

1.创建/修改文件 /etc/my.cnf,至少增加/修改一行 [mysql] [client] socket = /tmp/mysql.sock #在这里写上你的mysql.sock的正确位置,通常不是在 /tmp/ 下就是在 /var/lib/mysql/ 下2.指定IP地址,使用tcp方式连接mysql,而不使用本地sock方式 #mysql -h127.0.0.1 -uuser -ppassword 3.为 mysql.sock 加个连接,比如说实际的mysql.sock在 /tmp/

mysql start error ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysql.sock’ (2)

When I type mysql, it shows “ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysql.sock’ (2)”. Then I try to start mysql service: $ service mysql start But then I get error “ No directory, logging in with HOME=

ERROR 2002 (HY000): Can&#39;t connect to local MySQL server through socket &#39;/var/run/mysqld/mysqld.sock&#39; (2)

First make a backup of your /var/lib/mysql/ directory just to be safe. sudo mkdir /home/<your username>/mysql/ cd /var/lib/mysql/ sudo cp * /home/<your username>/mysql/ -R Next purge MySQL (this will remove php5-mysql and phpmyadmin as well as