yum localinstall mysql80-community-release-el7-1.noarch.rpm yum install mysql-community-server systemctl enable mysqld systemctl start mysqld
Having problems installing MySQL ? See troubleshooting section down below
Skip this step if you do not need to use a specific data filesystem
systemctl stop mysqld mkdir /opt/mysql-data # The new DB folder cp -a /var/lib/mysql/* /opt/mysql-data mv /var/lib/mysql /var/lib/mysql.backup chown -R mysql:mysql /opt/mysql-data chgrp -R mysql /opt/mysql-data ln -s /opt/mysql-data /var/lib/mysql systemctl start mysqld
service mysqld start or systemctl start mysqld
mysqld --initialize
mysql -u root -p
ALTER USER root@'localhost' IDENTIFIED BY 'xxxxxxxxx';
Those operations are no longer required, the tenant creation wizard available within the cockpit admin portal will automate this.
Example for MAIN database:
mysql --user=root -p CREATE DATABASE MAIN; USE MAIN; CREATE USER 'superadmin'@'%' identified by 'XXXXXXXX'; GRANT ALL PRIVILEGES ON MAIN.* TO 'superadmin'@'%';
Example for TENANT database:
mysql --user=root -p CREATE DATABASE TENANT; USE TENANT; CREATE USER 'tenantadmin'@'%' identified by 'XXXXXXXX'; GRANT ALL PRIVILEGES ON TENANT.* TO 'tenantadmin'@'%';
Edit /etc/my.cnf or /etc/mysql/my.cnf and add below parameter
disable-log-bin
sort_buffer_size = 15M
[mysqldump] password="[SECRET]"
CREATE USER 'backup'@'localhost' IDENTIFIED BY '[SECRET]'; GRANT SELECT, PROCESS ON *.* TO 'backup'@'localhost';
#!/bin/sh mysqldump -u root --single-transaction --databases [DB_NAME] > /[DB_FS]/[DB_NAME]_`date +%Y-%m-%d`.sql gzip /[DB_FS]/[DB_NAME]_`date +%Y-%m-%d`.sql find /pmlogs/mysql/backups -name "*" -mtime +7 -delete
crontab -e
0 22 * * * /[SCRIPTS]/do_backups.sh
mysql-community-server
modulemysql
module streamyum module disable mysql
yum module list mysql
rpm -qa | grep mysql80-community
mysql80-community-release-el8-5.noarch
wget https://dev.mysql.com/get/mysql80-community-release-el8-5.noarch.rpm yum localinstall mysql80-community-release-el8-5.noarch.rpm
yum makecache yum install mysql-community-server