Linux安装MySQL

删除MySQL

yum remove mysql mysql-server mysql-libs mysql-server

将找到的相关目录或文件删除

find / -name mysql

查询出的结果,使用yum remove删除

rpm -qa | grep mysql

安装MySQL

yum install mysql mysql-server mysql-libs mysql-server

启动MySQL

service mysqld start

修改密码

mysqladmin -u root password 123456

开启远程访问

grant all privileges on *.* to root @"%" identified by '123456' WITH GRANT OPTION