mysql-MYSQL登录报错,提示Error 2002

问题描述

MYSQL登录报错,提示Error 2002

重新安装mysql后,在启动服务登录时报ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
这样的错误,求解答。

解决方案

查看端口,netstat,看mysql服务是否在对应端口侦听。

解决方案二:

检查网络和防火墙,还有sql的服务器端是否运行

解决方案三:

参考:http://blog.csdn.net/hero06206/article/details/7313302
C连接mysql出现错误:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock

解决方案四:

是否已经禁止远程登录?

时间: 2024-08-03 01:20:49

mysql-MYSQL登录报错,提示Error 2002的相关文章

mysql登录报错提示:ERROR 1045 (28000)的解决方法_Mysql

本文分析了mysql登录报错提示:ERROR 1045 (28000)的解决方法.分享给大家供大家参考,具体如下: 一.问题: 公司linux系统的mysql数据库root用户设置过密码,但常常用命令'mysql -u root -p'登录报错,有时又能登录.登录报错信息为: [root@localhost ~]# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localho

MySQL Administrator 登录报错的解决方法_Mysql

使用MySQL Administrator 登录,报错: Either the server service or the configuration file could not be found.Startup variable and service section are there for disabled. 使用Root 登录进去以后看到管理功能都是禁止掉的,提示: This section is only avaliable when connected to localhost

Mysql报错Fatal error:Can't open and lock privilege tables

 Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 安装mysql后,启动时候没有启动成功,查看了下日志报错如下:--------------------------------------------- 1   可以:初始化mysql:mysql_install_db 2   目录权限问题chown -R mysql:mysql  /var/lib/mysql [

.net 连接阿里云上的mysql数据库一直报错

问题描述 .net 连接阿里云上的mysql数据库一直报错 代码如下: using MySql.Data; using MySql.Data.MySqlClient; static void Main(string[] args) { string str = "Database=chu;Data Source=rdsja29d3bs0j0z1jg55.mysql.rds.aliyuncs.com;Port=3306;User Id=XXX;Password=XXX;Charset=utf8&q

jdbc-安卓新手用JDBC连接mysql时一直报错

问题描述 安卓新手用JDBC连接mysql时一直报错 抛出异常在logcat提示:驱动连接成功,数据库连接失败Could not find class 'javax.naming.StringRefAddr', referenced from method com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty.storeTo.求大神帮忙,错误围绕好长时间了 连接代码 //连接数据库 public static Connection

linux虚拟机上安装mysql的时候报错

问题描述 linux虚拟机上安装mysql的时候报错 在执行scripts/mysql_install_db --user=mysql的时候出错, FATAL ERROR: Neither host 'localhost.localdomain' nor 'localhost' could be looked up with 我的etc/hosts文件也有localhost,并且可以ping通,请问该怎么解决呀? 解决方案 在虚拟机上安装了redhat Linux在虚拟机上安装linux 解决方

hql-HQL中使用占位符查询mysql数据老是报错...

问题描述 HQL中使用占位符查询mysql数据老是报错... 执行语句如下: Session session = HibernateUtil.getSession(); String hql = "from Category where name=?"; Query query = session.createQuery(hql); query.setString(0, "饮品"); 错误: ava.lang.NoSuchMethodError: org.hiber

mysql查询语句报错,怎么解决?

问题描述 mysql查询语句报错,怎么解决? unexpected token: h near line 1, column 142 [select count(o) from com.hm.dao.entity.Tenant o ,Houserentalinfo r ,com.hm.dao.entity.Houses h where o.id = r.userId and r.houseId = h.id and h.housePurpose = ' 公寓房 ' ] 解决方案 错误日志呢?可能

java-openmeetings无法进入登录页面 页面报错Internal error 求高手解答

问题描述 openmeetings无法进入登录页面 页面报错Internal error 求高手解答 用的是apache-openmeetings-3.0.7 连接的是oracle 安装完成后访问一切正常,但是关掉red5 再次启动后 页面无法进入 页面报错:Internal error 后台报错信息为: ERROR 12-30 14:22:42.142 DefaultExceptionMapper.java 255077 170 org.apache.wicke t.DefaultExcept