mysql连接问题
连接数据库时怎么出现这样的错误:[localhost] ERROR 1045: Access denied for user 'root'@'localhost' (using password: YES)
晕,语句贴来看看
你密码呢
密码错了吧。
刚学mysql,照着书上学的,书上用的MySQL Control Center,刚安装的时候,还可以连接,今天点击localhost下的connect就出现了上面的错误。密码设置的1234567890。而且在cmd中输入密码后,命令窗口自动消失
初学的话,建议先从命令行开始。直接用MYSQL.exe 来进行操作。
建议花15分钟看一下下面的这个MYSQL官方教程。
http://dev.mysql.com/doc/refman/5.1/zh/tutorial.html
SQL code:
C:\Documents and Settings\zxh>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.34-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
既然是root 权限应该足够了 可能是密码问题
同意 应该是密码问题
相关问答:
mysql比较菜,
字段里面有个 MB ,不是数值型,其它有些“未知”,怎么才能得出最终相加的结果?
SQL code:
mysql> select * from t;
+----------+
| size |
+----------+
| 0.47 MB |
| NU ......
是一条更新操作:
Java code:
……
private Integer bonus = 0;
public Integer getBonus() {
return bonus;
}
public void setBonus(Integer bonus) {
this.bonus = bonus;
}
String SQL = ......
select time from table
time
2009-09-12 12
2009-09-12 13
2009-09-12 14
2009-09-12 15
怎么将 查询的数据变为
time
2009-09-12 12时
2009-09-12 13时
2009-09-12 14时
......
我的MySQL编码,我在my.ini中设置的为utf8,在创建数据库时选择的编码为utf8_Unicode_ci,我在、从页面插入数据库,在页面上显示正常,但从phpmyadmin中,查看时,显示为乱码(ÎÒÎÒ¡£& ......