安装依赖
yum install libaio wget -y
检查MYSQL是否已安装、
yum list installed | grep mysql
如果有先卸载
-y remove mysql-libs.x86_64
下载MySQL官网的仓库文件
cd /tmp
wget http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
yum localinstall mysql80-community-release-el7-1.noarch.rpm
验证仓库是否添加成功
yum repolist enabled | grep "mysql.*-community.*"
展开全文
安装MySQL
yum install mysql-community-server -y
此时MySQL 安装完成,它包含了
mysql-community-server、mysql-community-client
mysql-community-common、mysql-community-libs 四个包
执行
rpm -qi mysql-community-server.x86_64 0:8.0.16-2.el7
whereis mysql
可以看到MySQL 的安装目录是 /usr/bin/
启动服务
systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld
查找初始密码
cat /var/log/mysqld.log | grep password
这里可以看到初始密码
进入mysql
mysql -uroot -p
修改初始密码
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '你的密码';
设置允许远程连接
mysql> use mysql;
mysql> select host,user,authentication_string,plugin from user;
mysql> update user set host='%' where user='root';
mysql> flush privileges;
查看字符编码
mysql> status
如果是【utf8mb4】那就不用改了
接下来就可以通过navicat进行连接了
标签: medy安卓版教程
评论列表
temctl start mysqld systemctl enable mysqld systemctl status mysqld查找初始密码cat /var/log/mysqld.log | grep password这里可以看到初始密码进入mysqlmysql -uroot -p修改初始
in/启动服务systemctl start mysqld systemctl enable mysqld systemctl status mysqld查找初始密码cat /var/log/m
get http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpmyum localinstall mysql80-community-release-el7-1.noarch.rpm验证
安装依赖yum install libaio wget -y检查MYSQL是否已安装、yum list installed | grep mysql如果有先卸载-y remove mysql-libs.x86_64下载MySQL官网的仓库文件cd /tmpwget http://repo.mys