Operating system: CentOS 8
OS version: Linux 4.18.0-240.22.1.el8_3.x86_64 #1 SMP Thu Apr 8 19:01:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Is there a guide or an option that I can use to have MySQL installed instead of MariaDB?
I’ve spent so many hours getting this to work but didn’t fully succeed yet. Here’s my procedure up till now:
- Install Virtualmin using the install.sh script
- Remove MariaDB:
yum remove mariadb* -y
- Disable the mysql repos built in CentOS 8, otherwise they conflict with the installation:
yum module disable mysql -y
- Clear the mysql data directory at /var/lib/mysql, otherwise the daemon won’t start, giving error that it is still upgrading existing databases:
rm -rf /var/lib/mysql/*
- Set up mysql’s repo:
yum install https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm -y
- Install mysql:
yum install mysql-community-server -y
- Start the server:
service mysqld start
- Secure the new installation:
Now the problem at the last step is that the root password is not getting accepted:
[root@myserver ~]# mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: Error: Access denied for user 'root'@'localhost' (using password: YES) [root@myserver ~]#
Using Virtualmin’s post-installation setup wizard also fails saying
Warning! Incorrect MySQL password at the step of setting up a MySQL root password.
What am I doing wrong here?
Is there an easier way to have Oracle’s MySQL instead of MariaDB?