#rpm -ivh MySQL-server-advanced-5.6.****-1.el6.x86_64.rpm
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.
You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.
Also, the account for the anonymous user has been removed.
In addition, you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test database.
This is strongly recommended for production servers.
See the manual for more instructions.
Please report any problems at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
#rpm -ivh MySQL-client-advanced-5.6.****-1.el6.x86_64.rpm
说明:不安装mysql-client是不能使用mysql工具登陆到mysql数据库
(1)查看文件寻找密码
vi /root/.mysql_secret
(2)登陆Mysql
linux mysql 服务启动和关闭
service mysql start service mysql stop
登陆服务器
mysql -u root -p
(3)修改密码
mysql> set password=password('123456') ;
也可以使用脚本 /usr/bin/mysql_secure_installation进行交互式的修改mysql的root密码