openeuler系统上安装MySQL数据库
一、下载
1、下载安装包
MySQL官网进行下载,https://downloads.mysql.com/archives/community/
下载页面如下,MySQL的版本根据需要选择,操作系统和操作系统的版本要和图片保持一致,否则安装过程中会有问题,因为最新的openeuler版本相当于centos8,所以选择el8的版本下载安装
2、解压目录展示
要用到的rpm包是选中的5个
二、安装前检查
注意:本人在操作的时候使用ifconfig指令提示没有此命令,遂进行了相应的安装,yum -y install net-tools,在使用rpm -qa|grep net-tools检查提示没有的时候,可以进行相应的安装
三、安装
-- 注意在安装server包之前可能还需要一个icu-data包, mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm,如果在执行rpm -ivh mysql-community-server-8.0.25-1.el8.x86_64.rpm有报错提示需要icu-data,先安装icu-data,这个icu-data就很贴切,哈哈
至此安装完成。
mysqld --initialize --user=mysql
-- 初始话密码是执行mysqld --initialize --user=mysql后在 /var/log/mysqld.log有记录,上文已经圈出 alter user root@localhost identified by new_password; -- 修改密码
四、图形化界面连接MySQL问题处理
1、关闭防火墙(自己用简单粗暴)
1、直接关闭Linux机器上的防火墙 [root@localhost ~]# systemctl status firewalld 查看防火墙的状态 [root@localhost ~]# systemctl stop firewalld 关闭防火墙 [root@localhost ~]# systemctl status firewalld 将防火墙设置成开机关闭
2、root用户权限修改
[root@localhost opt]# mysql -uroot -p密码 # 登录MySQL数据库 mysql> use mysql; #切到MySQL自带的mysql数据库 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select host,user from user; mysql> update user set host = % where user=root; -- 修改为任意host都可以访问 mysql> flush privileges; -- 刷新权限 mysql> alter user root@% identified with mysql_native_password by 654321; -- 修改密码的加密方式,使图形化工具可以连接上``` 感谢江湖人称康师傅的MySQL数据库篇的视频,在此基础上进行了一定的探索成功在openeuler上装上了MySQL数据库,如有疑问可以评论留言。
下一篇:
SQLServer基础语法大全(基础篇)