求助:把自带的mysql升级后root进不去了。

求助:把自带的mysql升级后root进不去了。

我把FC1的mysql升级到4.0以后出问题了。原来ROOT是空的密码,现在进不去了。
你问我要怎么办?

我是用RPM包安装的。

能不能告诉我如何把它删除?或者清空现有的ROOT密码。

hiandy168@163.com

========================情况如下==================================

[root@it root]# /usr/bin/mysql_install_db


Installing all prepared tables
040705 17:45:14 Warning: Asked for 196608 thread stack, but got 126976
040705 17:45:14 /usr/sbin/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h it password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd / ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com


[root@it root]# /usr/bin/mysqld_safe &
[1] 7360
[root@it root]# Starting mysqld daemon with databases from /var/lib/mysql
040705 17:46:02 mysqld ended


[1]+ Done /usr/bin/mysqld_safe


[root@it root]# netstat -a |grep mysql

tcp 0 0 it:mysql *:* LISTEN
unix 2 [ ACC ] STREAM LISTENING 1678471 /var/lib/mysql/mysql.sock

[root@it root]# mysqladmin --version
mysqladmin Ver 8.40 Distrib 4.0.20, for pc-linux on i686

[root@it root]# mysqladmin -u root password '123456'

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

[root@it root]# cat /var/lib/mysql/mysql.sock
cat: /var/lib/mysql/mysql.sock: 没有那个文件或目录      
按照常理,再升级或重装数据库时应该备份老数据表,然后删除老库。所以应该先将你的表dump下来,删除/var/lib/mysql下的东西,然后再升级,最后将备份恢复。如果你已经做了升级,我想你应该将/var/lib/mysql下的目录换名,尤其是/var/lib/mysql/mysql。然后再升一次级,然后重新建root的帐号(输入root密码)。      
那现在这个问题应该怎么办?少mysql.sock,我也是这个问题      
安装正常了就不少mysql.sock了