首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

cmd 进入mysql解决方案

2012-04-04 
cmd 进入mysql我用cmd进入mysql通常情况下是:mysql -u root -p然后提示输入密码进入如下界面Assembly code

cmd 进入mysql
我用cmd进入mysql通常情况下是:
mysql -u root -p
然后提示输入密码
进入如下界面

Assembly code
C:\Documents and Settings\Administrator>mysql -u root -pEnter password: ****Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 2 to server version: 5.0.19-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.

但是现在我进入cmd直接输入mysql然后就进入了
Assembly code
C:\Documents and Settings\Administrator>mysqlWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 4 to server version: 5.0.19-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>

这是什么原因,这不就没有安全性了吗,还是我哪里设置有问题?


[解决办法]
你可以 select user, host from mysql.user; 看看有没有 user 为空的用户,另外这个用户一般是指定 localhost 的,所以只有本机可以登录。如果觉得危险,删掉这样的用户就行了呗。
[解决办法]
检查 用户是否设置密码
SELECT * FROM mysql.user;
or
SELECT USER();

[解决办法]
你直接 show grants 看一下就明白了。你使用应该是默认的用户名。
[解决办法]
你的密码在配置文件里面写好了 找到my.ini 然后看[clicent] 是否有passwd项

热点排行