Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1707351
  • 博文数量: 263
  • 博客积分: 1218
  • 博客等级: 少尉
  • 技术积分: 2862
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-19 02:33
文章分类

全部博文(263)

文章存档

2020年(12)

2019年(2)

2018年(10)

2016年(1)

2015年(20)

2014年(115)

2013年(46)

2012年(37)

2011年(20)

分类: Mysql/postgreSQL

2012-02-27 10:29:47

有时候在DOS窗口中输入

C:\Documents and Settings\Administrator>mysql -uroot;

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.1.32-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;

会有出错提示

ERROR 1044 (42000): Access denied for user to database

,自己机子上的应该也不是权限问题,本身就是空密码

后来试一下居然是这个问题

把第一个mysql -uroot; 后面的分号';'去掉就可以了。

C:\Documents and Settings\Administrator>mysql -uroot

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.1.32-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Database changed

阅读(1018) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~