官网下载:https://downloads.mysql.com/archives/community/
上传到服务器,然后解压缩
tar -zxvf mysql-8.0.31-linux-glibc2.17-aarch64.tar.gz
mv mysql-8.0.31-linux-glibc2.17-aarch64 /usr/local/mysql-8
创建MySQL数据目录
mkdir -p /data
cd data
mkdir -p mysql
生成编辑配置文件
vim /etc/my.cnf
[mysqld]
bind-address=0.0.0.0
port=3306
user=xxx
basedir=/usr/local/mysql-8
datadir=/data/mysql
socket=/tmp/mysql.sock
log-error=/data/mysql/mysql.err
pid-file=/data/mysql/mysql.pid
#character config
character_set_server=utf8mb4
symbolic-links=0
初始化MYSQL
cd /usr/local/mysql-8/bin/
./mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql-8/ --datadir=/data/mysql/ --user=mysql --initialize
查看初始密码
cat /data/mysql/mysql.err
启动mysql
cp /usr/local/mysql-8/support-files/mysql.server /etc/init.d/mysql
/etc/init.d/mysql status
启动 service mysql start
更改密码
cd /usr/local/mysql-8/bin/
./mysql -u root -p
alter user 'root'@'localhost' identified by 'abc123,.';
更改访问权限
use mysql;
update user set host = '%' where user = 'root';
flush privileges;
ali
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial main
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial universe
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-security universe
huawei
deb https://repo.huaweicloud.com/ubuntu-ports/ bionic main restricted universe multiverse
deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic main restricted universe multiverse
deb https://repo.huaweicloud.com/ubuntu-ports/ bionic-security main restricted universe multiverse
deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic-security main restricted universe multiverse
deb https://repo.huaweicloud.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://repo.huaweicloud.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
apt-get update文章来源:https://www.toymoban.com/news/detail-485269.html
sudo apt-get install mysql-client文章来源地址https://www.toymoban.com/news/detail-485269.html
到了这里,关于arm版(以uos为例)linux安装mysql8的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!