Configuring MySQL 8 instance on CentOS 7 in OCI
As root, execute the below commands to have a MySQL 8 instance running
rpm -Uvh https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm
sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/mysql-community.repo
yum --enablerepo=mysql80-community install -y mysql-community-server
systemctl start mysqld
grep "A temporary password" /var/log/mysqld.log
Secure Installation
mysql_secure_installation
Connect to the database
mysql -u root -p
Create database and user
CREATE DATABASE mydb;
create user 'ouser'@'%' identified by 'QqX05.SA%>UNdd';
GRANT ALL PRIVILEGES ON *.* TO 'ouser'@'%';
For testing environments, you can lower the password check
SET GLOBAL validate_password.policy=LOW;
This way there is no need of adding string passwords (for development)
Allowing external connections to db
Edit /etc/my.cnf
and add the below line
bind-address=*
restart MySQL
systemctl restart mysqld
Workaround for ‘Access denied for user ‘root’@’localhost’
https://stackoverflow.com/questions/41645309/mysql-error-access-denied-for-user-rootlocalhost
2 thoughts on “Configuring MySQL 8 instance on CentOS 7 in OCI”