QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2536|回复: 3

debian下安装mysql问题!(已解决)

[复制链接]
发表于 2005-9-13 10:42:21 | 显示全部楼层 |阅读模式
root@0[bin]# ./mysqladmin version
./mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'


./mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@0[bin]# ./mysql -u mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 4.1.14-standard

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

mysql>

为什么用root不能 呢 ?
发表于 2005-9-13 10:57:55 | 显示全部楼层
最后不是进去了?
后面跟数据库名是正解
回复

使用道具 举报

 楼主| 发表于 2005-9-13 11:02:42 | 显示全部楼层
查看了一下man mysql
然后解决了问题:
原来是要这么干的:
mysqladmin version -p
Enter password:
mysqladmin  Ver 8.41 Distrib 4.1.14, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          4.1.14-standard
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
Uptime:                 25 min 38 sec

Threads: 1  Questions: 12  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 1  Queries per second avg: 0.008

因为我之前给root设置了 密码
所以得用密码进去!
回复

使用道具 举报

发表于 2005-9-13 11:13:51 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-3-28 23:03 , Processed in 0.053298 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表