1、安装

1
yum install mysql mysql-server

2、启动

1
service mysqld start

3、登录

1
mysql -uroot -p

4、改密码

1
set password for [email protected]=password('your_password')

5、查看密码

1
select user,host,password from mysql.user

备注:

更改数据库编码参考:

1
SET character_set_client = utf8 ;