【中标麒麟服务器操作系统7.0】安装【MySQL8.0.25】过程及可能出现的问题
xixuefeng
Linux, OS
2021-06-02 9:17:53
2,281 次浏览
【中标麒麟服务器操作系统7.0】安装【MySQL8.0.25】过程及可能出现的问题已关闭评论
操作系统:中标麒麟高级服务器操作系统7.0,介质:nsV7Update6-adv-lic-build4-x86_64.iso,最小化安装
数据库:mysql-8.0.25-el7-x86_64.tar.gz
1:安装步骤与在CentOS7中安装5.7的步骤相同,详情参照:http://www.xxf-home.net/archives/643
注意:在初始化数据库的时候,(也就是/usr/local/mysql/bin/mysqld –initialize –user=mysql –datadir=/data/db/mysql/2587 –basedir=/usr/local/mysql这一步),报如下错误
1 2 3 |
[root@zbql local]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/data/db/mysql/2587 --basedir=/usr/local/mysql /usr/local/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory [root@zbql local]# |
缺少库文件,利用yum安装,安装完成后,初始化正常。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
[root@zbql bin]# yum install libaio* -y ns7-adv-os | 3.7 kB 00:00:00 ns7-adv-updates | 2.9 kB 00:00:00 (1/3): ns7-adv-os/x86_64/group_gz | 145 kB 00:00:00 (2/3): ns7-adv-updates/x86_64/primary_db | 2.8 MB 00:00:01 (3/3): ns7-adv-os/x86_64/primary_db | 7.5 MB 00:00:01 Resolving Dependencies --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================================================= Installing: libaio x86_64 0.3.109-13.el7 ns7-adv-os 24 k libaio-devel x86_64 0.3.109-13.el7 ns7-adv-os 12 k Transaction Summary ======================================================================================================================================================================= Install 2 Packages Total download size: 36 k Installed size: 46 k Downloading packages: (1/2): libaio-devel-0.3.109-13.el7.x86_64.rpm | 12 kB 00:00:00 (2/2): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 220 kB/s | 36 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : libaio-0.3.109-13.el7.x86_64 1/2 Installing : libaio-devel-0.3.109-13.el7.x86_64 2/2 Verifying : libaio-0.3.109-13.el7.x86_64 1/2 Verifying : libaio-devel-0.3.109-13.el7.x86_64 2/2 Installed: libaio.x86_64 0:0.3.109-13.el7 libaio-devel.x86_64 0:0.3.109-13.el7 Complete! [root@zbql bin]# |
2:navicat连接MySQL8.0出现2059的错误
原因:在mysql8之前密码的加密规则为mysql_native_password,在mysql8以后密码的密规则为caching_sha2_password,navicat驱动默认用的是mysql_native_password
解决方法如下:(修改一下登录navicat用户的密码规则)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[root@zbql ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.25 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> mysql> use 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> mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'oracle'; Query OK, 0 rows affected (0.00 sec) mysql> |