arm64架构的Linux安装mysql5.7
tar -xvf mysql-5.7. -C /usr/local/
4.配置Mysql
mv /usr/local/mysql-5.7.27-aarch64 /usr/local/mysql
mkdir -p /usr/local/mysql/logs
chown -R mysql:mysql /usr/local/mysql
ln -sf /usr/local/mysql/myf /etc/myf
cp -rf /usr/local/mysql/extra/lib* /usr/lib64/
mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.old
ln -s /usr/lib64/libstdc++.so.6.0.24 /usr/lib64/libstdc++.so.6
5.设置开机启动
cp -rf /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
systemctl enable mysqld
6. 添加环境变量
vi /etc/profile
export MYSQL_HOME=/usr/local/mysql
PATH:
export PATH=MYSQL_HOME/bin
source /etc/profile
7. 初始化启动mysql
mkdir /usr/local/mysql/data
chown -R mysql:mysql /usr/local/mysql/data
mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data systemctl start mysqld
systemctl status mysqld
8 设置数据库root的密码
mysql下载选x86还是armmysql_secure_installation
9.登陆mysql
/usr/local/mysql/bin/mysql -u root -p
10.修改远程连接
show databses;
use mysql;
select user,host from user;
update user set host=’%’ where user = ‘root’;
flush privileges;
select user,host from user;
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论