BC-Linux安装mysql8

25 阅读1分钟

yum安装

wget https://repo.mysql.com/mysql80-community-release-el8-6.noarch.rpm
sudo rpm -ivh mysql80-community-release-el8-6.noarch.rpm

// sudo yum install -y mysql-community-server
sudo dnf install mysql-community-server --nogpgcheck

设置开机自启

sudo systemctl start mysqld
sudo systemctl enable mysqld

MySQL 8首次启动时生成临时密码,通过以下命令获取:

sudo grep "temporary password" /var/log/mysqld.log

修改root密码

ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewStrongPassword!';

安装jdk17

sudo dnf install java-17-openjdk-devel