```bash [root@localhost rpm]# /usr/bin/mysql_install_db [root@localhost rpm]# service mysql start [root@localhost rpm]# cat /root/.mysql_secret # 查看root账号的随机生成密码 # The random password set for the root user at Wed Dec 11 23:32:50 2013 (local time): qKTaFZnl [root@localhost ~]# mysql -uroot -pqKTaFZnl mysql> SET PASSWORD = PASSWORD('123456'); mysql> exit [root@localhost ~]# mysql -uroot -p123456 ```