arm架构mysql_基于arm架构linux操作系统centos安装mysql5由于鲲鹏的流⾏趋势,尝试基于arm的mysql安装
⽹上很多教程缺⽄少两,总是差点意思,亲测后总结⼀下内容
此教程仅适⽤于mysql5版本,⼤于mysql5版本不确保正确
1. 添加mysql⽤户组和mysql⽤户,⽤于隔离mysql进程
[root@arm ~]# groupadd -r mysql && useradd -r -g mysql -s /sbin/nologin -M mysql
2.安装依赖库
[root@arm ~]# yum install -y libaio*
3. 下载解压Mysql
[root@arm ~]# tar xvf mysql-5.7. -C /usr/local/
4.配置Mysql
[root@arm ~]# mv /usr/local/mysql-5.7.27-aarch64 /usr/local/mysql
[root@arm ~]# mkdir -p /usr/local/mysql/logs
[root@arm ~]# chown -R mysql:mysql /usr/local/mysql
[root@arm ~]# ln -sf /usr/local/mysql/myf /etc/myfmysql下载安装教程步骤
[root@arm ~]# cp -rf /usr/local/mysql/extra/lib* /usr/lib64/
[root@arm ~]# mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.old
[root@arm ~]# ln -s /usr/lib64/libstdc++.so.6.0.24 /usr/lib64/libstdc++.so.6
# 设置开机启动
[root@arm ~]# cp -rf /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
[root@arm ~]# chmod +x /etc/init.d/mysqld
[root@arm ~]# systemctl enable mysqld
5. 添加环境变量
[root@ecs-arm ~]# vi /etc/profile
export MYSQL_HOME=/usr/local/mysql
export PATH=$PATH:$MYSQL_HOME/bin
[root@ecs-arm ~]# source /etc/profile
随机密码初始化登录
# "–initialize"⽣成随机密码,在这⾥存储在/usr/local/mysql/logs/mysql-error.log
[root@ecs-arm ~]# mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data [root@ecs-arm ~]# systemctl start mysqld
[root@ecs-arm ~]# systemctl status mysqld
# 查看随机密码
[root@ecs-arm ~]# cat /usr/local/mysql/logs/mysql-error.log | grep password
6.登录mysql修改密码(需要输⼊随机密码)
[root@localhost /]#  mysql -u root -p
Enter password:
mysql>set password for root@localhost = password('NiDeMiMaPassWord'); ----注意最结束符分号⼀定要写
7.开放远程连接
mysql>use mysql;
msyql>update user set user.Host='%' where user.User='root';
mysql>flush privileges;
————————————————
版权声明:本⽂为CSDN博主「Gina虞」的原创⽂章,遵循CC 4.0 BY-SA版权协议,转载请附上原⽂出处链接及本声明。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。