开发者社区> 问答> 正文

java环境


使用的是镜像市场 Java运行环境(Ubuntu 64位 | JDK1.7) 集成软件:JDK1.7.0、Nginx1.6.0、MySQL5.5.37、Tomcat7.0.54、vsFTPd2.3.5  
mysql服务是可以启动的
以下是一些命令出现的错误
root@iZ23qm9j00mZ:/# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@iZ23qm9j00mZ:/# mysql -u root -p
Enter password:  
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


跳过权限的方法
root@iZ23qm9j00mZ:/# service mysqld stop
Shutting down MySQL
. *  
root@iZ23qm9j00mZ:/# /alidata/server/mysql-5.5.37/bin/mysqld_safe --skip-grant-tables&
[1] 31087
root@iZ23qm9j00mZ:/# 141202 18:40:28 mysqld_safe Logging to '/alidata/log/mysql/error.log'.
141202 18:40:28 mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&




仍然出现以上登录错误
root@iZ23qm9j00mZ:~# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
root@iZ23qm9j00mZ:~# mysql -u root -p
Enter password:  
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


错误原因主要是
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
第一主要是密码不正确
第二个和第三个无法解决


另外百度经验 没有成功 百度经验地址有于等级在这里就不写了


展开
收起
lc201315 2015-01-08 14:57:49 8517 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载