1. Installation
Yum-y install MySQL mysql-devel mysql-server add boot entry chkconfig--add mysqld join boot start chkconfig mysqld on
2. Set the root password
Mysqladmin-uroot password "123456"
3. Enter the database
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/76/C9/wKioL1ZcVc3TeM4pAAMvwHBJRb0854.jpg "title=" 222222.jpg "alt=" Wkiol1zcvc3tem4paamvwhbjrb0854.jpg "/>
4. View the database
Mysql> Show databases;+--------------------+| Database |+--------------------+| Information_schema | | MySQL | | Test |+--------------------+3 rows in Set (0.00 sec)
Database directory is/var/lib/mysql/
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/76/CA/wKiom1ZcVjOyPYhxAAIb7UU6f_4053.jpg "title=" 1111111.jpg "alt=" Wkiom1zcvjoypyhxaaib7uu6f_4053.jpg "/>
5. Change your password
The original password is 123456
Law One:
$mysqladmin-uroot-p123456 Password "654321" $mysql-uroot-p654321-s && echo $?mysql> mysql> \q0
Law II:
mysql> Update Mysql.user Set Password=password ("654321") where user = ' root ' and host = ' localhost ';mysql> flush pri Vileges; Be sure to refresh the permissions, or the original password query OK, 0 rows Affected (0.00 sec)
6. Authorizing remote administrative users
Mysql> Grant All on * * to ' admin ' @ '% ' identified by ' admin ' with grant option;mysql> flush privileges; Refresh the permissions so that they take effect. Query OK, 0 rows Affected (0.00 sec)
Yum-style installation of MySQL and common operations summary