查看系统自带的mysql版本:rpm -qa | grep mysql
卸载mysql:rpm -e mysql-libs-5.1.73-8.el6_8.x86_64 --nodeps
1. 安装mysql 服务器端:
yum -y install mysql-server mysql-devel
2. 安装mysql客户端:
yum install mysql
3. 启动mysql服务:
service mysqld start或者/etc/init.d/mysqld start
停止:
service mysqld stop
重启:
service mysqld restart
4. 创建root管理员:
mysqladmin -u root password root
5.登陆
mysql -uroot -proot
6.root权限
GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root";
flush privileges;
设置mysql的开机启动
chkconfig --add mysqld
chkconfig mysqld on