CentOS 7的yum源中貌似没有正常安装MySQL时的MySQL-sever文件,需要去官网上下载
成功安装之后重启MysqL服务
#serviceMysqLdrestart
|
初次安装MysqL是root账户是没有密码的
设置密码的方法
# MysqL -uroot
MysqL> set password for ‘root’@‘localhost’ = password('mypasswd');
MysqL> exit
搞定!
远程授权连接MysqL
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;