LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 901|回复: 1

求助:把自带的MYSQL升级后ROOT进不去了。

[复制链接]
发表于 2004-7-5 21:23:04 | 显示全部楼层 |阅读模式
我把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: 没有那个文件或目录
发表于 2004-7-6 12:11:05 | 显示全部楼层
检查/etc/my.cnf,[MYSQL_HOME]/logs/mysqld.log ,确认mysql已经正常启动,如果丢失密码,可以通过mysqladmin实现mysql root用户密码的修改。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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