麒麟系统安装arm架构Mysql 一、准备工作 1.查看麒麟系统版本 [root@0001]#cat /proc/versionlinux version 4.19.90-23.8.v2101.ky1
[root@0001]#cat /proc/versionlinux version 4.19.90-23.8.v2101.ky10.x86_64 (KYLINSOFT@localhost.localdomain) (GCc version 7.3.0 (GCC)) #1 SMP Mon May 17 17:08:34 CST 2021
或者
[root@0001]hostnamectl Static hostname: 0001 Icon name: computer Machine ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Boot ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Operating System: Kylin Linux Advanced Server V10 (Tercel) Kernel: Linux 4.19.90-23.8.v2101.ky10.aarch64 Architecture: arm64
由此可以看出这是麒麟2021出的,基于linux 4.19做的,其所对标红帽或者Centos 8之后
Red Hat Enterprise Linux 8 / oracle Linux 8 (x86, 64-bit), RPM Bundle
MySQL :: Download MySQL Community Server
rpm -qa | grep mariadbrpm -e {mariadb-server,mariadb,mariadb-errmessage,mariadb-common}rpm -qa | grep mariadb
tar -xvf mysql-8.0.32-1.el8.aarch64.rpm-bundle.tarrpm -ivh mysql-commUnity-common-8.0.32-1.el8.aarch64.rpm --nodeps --forcerpm -ivh mysql-community-client-plugins-8.0.32-1.el8.aarch64.rpm --nodeps --forcerpm -ivh mysql-community-libs-8.0.32-1.el8.aarch64.rpm --nodeps --forcerpm -ivh mysql-community-client-8.0.32-1.el8.aarch64.rpm --nodeps --forcerpm -ivh mysql-community-server-8.0.32-1.el8.aarch64.rpm --nodeps --force
systemctl status mysqld
systemctl start mysqld
systemctl stop mysqld
vim /etc/my.cnflower_case_table_names=1#1:数据库大小写不敏感#0:数据库大小写敏感#其余的配置可以视情况进行调整#初始化数据库mysqld --initialize --console#若是报 mysqld: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory 的错误,解决办法如下:https://vault.centos.org/centos/8/AppStream/aarch64/os/Packages/compat-openssl10-1.0.2o-3.el8.aarch64.rpm上传到服务器中并进行安装rpm -ivh compat-openssl10-1.0.2o-3.el8.aarch64.rpm --nodeps --force#安装完成后继续执行 mysqld --initialize --console 命令。
which mysql
mysql -V
cat /var/log/mysqld.log#通过临时密码直接登录,然后修改密码即可
#关闭mysql服务systemctl stop mysqld#修改mysql配置文件vim /etc/my.cnf添加skip-grant-tables#启动mysql服务systemctl start mysqldmysql -u root -p可以直接登陆#需先将密码置为空,不然会产生报错update mysql.user set authentication_string='' where user='root';#刷新权限:FLUSH PRIVILEGES;#退出将mysql配置文件的skip-grant-tables注释掉#修改用户密码ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';#将root用户密码设置为rootmysql -uroot -p如遇不可登录可以使用mysql -uroot -proot -h127.0.0.1
创建用户注意使用mysql_native_passWord
eg:
create USER 'XXX'@'%' IDENTIFIED WITH mysql_native_password BY 'xxx';grant all on *.* to 'XXX'@'%' with grant option;
来源地址:https://blog.csdn.net/qq_939317133/article/details/128835398
--结束END--
本文标题: 银河麒麟安装arm架构mysql
本文链接: https://lsjlt.com/news/388352.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0