Linux安装Mysql服务
2019-10-31 本文已影响0人
小马哥是没有感情的
适用于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;