yttlovezxx 发表于 2005-9-13 10:42:21

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

root@0# ./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# ./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不能 呢 ?

bwb 发表于 2005-9-13 10:57:55

最后不是进去了?
后面跟数据库名是正解

yttlovezxx 发表于 2005-9-13 11:02:42

查看了一下man mysql
然后解决了问题:
原来是要这么干的:
mysqladmin version -p
Enter password:
mysqladminVer 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: 1Questions: 12Slow queries: 0Opens: 12Flush tables: 1Open tables: 1Queries per second avg: 0.008

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

bwb 发表于 2005-9-13 11:13:51

:-D
页: [1]
查看完整版本: debian下安装mysql问题!(已解决)