适用于Centos6.X
下载安装MySQL
yum install -y mysql mysql-server mysql-devel
启动MySQL服务
/etc/init.d/mysqld start
Mysql连接并登陆Mysql服务
mysql
mysql >
修改登陆用户名和密码
USE mysql;
UPDATE user SET Password=PASSWORD('123456') WHERE user='root';
设置运行远程登陆
GRANT ALL PRIVILEGES ON *. * TO 'root'@'% ' IDENTIFIED BY '123456' WITH GRANT OPTION;
强制写入
FLUSH PRIVILEGES;
网友评论