- 论坛徽章:
- 0
|
rpm -ivh MySQL-3.23.58-1.i386.rpm
rpm -ivh MySQL-client-3.23.58-1.i386.rpm
执行之后,系统提示我可以利用命令
先卸载mysql
[root@query soft]# rpm -e MySQL-3.23.58
[root@query bin]# rpm -e MySQL-client-3.23.58
-----install
[root@query soft]# rpm -ivh MySQL-3.23.58-1.i386.rpm
warning: MySQL-3.23.58-1.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL ########################################### [100%]
Installing all prepared tables
040422 18:01:45 /usr/sbin/mysqld: Shutdown Complete
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h query.hurray.com.cn 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!
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
Starting mysqld daemon with databases from /var/lib/mysql
[root@query soft]#
[root@query soft]#
[root@query soft]# /usr/bin/mysqladmin -u root password 'new-password'
-bash: /usr/bin/mysqladmin: No such file or directory
[root@query soft]# /usr/bin/mysqladmin -u root -h query.hurray.com.cn password 'new-password'
-bash: /usr/bin/mysqladmin: No such file or directory
[root@query soft]#
[root@query soft]#
[root@query soft]# rpm -ivh MySQL-client-3.23.58-1.i386.rpm
warning: MySQL-client-3.23.58-1.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
--------------------
按照他上面的提示,执行了修改命令操作,但是却提示错误.
[root@query soft]# /usr/bin/mysqladmin -u root -h query.hurray.com.cn password 'new-password'
/usr/bin/mysqladmin: connect to server at 'query.hurray.com.cn' failed
error: 'Access denied for user: 'root@query.hurray.com.cn' (Using password: NO)'
[root@query soft]# /usr/bin/mysqladmin -u root -h query.hurray.com.cn -p password 'new-password'
Enter password:
/usr/bin/mysqladmin: connect to server at 'query.hurray.com.cn' failed
error: 'Access denied for user: 'root@query.hurray.com.cn' (Using password: NO)'
[root@query soft]# su - mysql
[mysql@query mysql]$ /usr/bin/mysqladmin -u root -h query.hurray.com.cn -p password 'new-password'
Enter password:
/usr/bin/mysqladmin: connect to server at 'query.hurray.com.cn' failed
error: 'Access denied for user: 'root@query.hurray.com.cn' (Using password: NO)'
[mysql@query mysql]$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>; use mysql
ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
mysql>; exit
Bye
[mysql@query mysql]$ mysql -u root -p
Enter password:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
[mysql@query mysql]$ mysql -u root
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
[mysql@query mysql]$ |
|