标签:xxx art 命令行 HERE flush 直接 rpm -ivh iad serve
CentOS7安装mysql80
在xshell运行命令
# wget http://repo.mysql.com/mysql80-community-release-el7.rpm
安装
# rpm -ivh mysql80-community-release-el7.rpm
# yum install mysql
# yum install mysql-server
# yum install mysql-devel
mysql 是 MySQL 客户端,mysql-server 是数据库服务器,mysql-devel 则包含了开发用到的库以及头文件。
这步可能会花些时间,安装完成后就会覆盖掉之前的 mariadb:
过程中遇到的选择项直接输入y就行
启动 MySQL 服务:
# systemctl start mysqld.service
查看运行状态
# systemctl status mysqld.service
成功开启的截图
# grep "password" /var/log/mysqld.log
->登录数据库
mysql> ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY‘new password‘;
先确保有打开3306端口,可以上阿里云添加入站规则,或者直接命令行打开防火墙端口,请自行google。
mysql> CREATE USER ‘eangaie‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘xxxxxx‘;
mysql>GRANT ALL PRIVILEGES ON *.* TO‘eangaie‘@‘localhost‘;
update user set Host =‘%‘ where User =‘eangaie‘;
mysql> flush privileges;
标签:xxx art 命令行 HERE flush 直接 rpm -ivh iad serve
原文地址:https://www.cnblogs.com/w53064/p/10265947.html