How to installing MySQL 8 on CentOS 7 with ispmanager 5 lite

1
48

How to installing MySQL 8 on CentOS 7 with ispmanager 5 lite

 

Next, turn off Сервер СУБД MySQLin the section Возможности. The next step is to remove the current server MariaDB:

yum remove mysql

The following packages will be offered for removal:

======================================================================================================
 Package                     Arch         Version                        Repository              Size
======================================================================================================
Removing:
 mariadb                     x86_64       1:5.5.60-1.el7_5               @base                   49 M
Removing for dependencies:
 coremanager-pkg-mysql       x86_64       5.194.1-1.el7.centos           @ispsystem-beta5       1.5 k
 mariadb-server              x86_64       1:5.5.60-1.el7_5               @base                   58 M
 mysqltuner                  noarch       1.7.13-1.git.59e5f40.el7       @epel                  261 k

Transaction Summary
======================================================================================================
Remove  1 Package (+3 Dependent packages)

Installed size: 107 M
Is this ok [y/N]:

We delete the folder /var/lib/mysql. This will delete all (!) Existing databases. You can skip this step if you are concerned that not all data has been backed up.

rm -Rfv /var/lib/mysql

Install the repository MySQL8:

wget https://dev.mysql.com/get/mysql80-community-release-el7-2.noarch.rpm
rpm -i /root/mysql80-community-release-el7-2.noarch.rpm
yum makecache

Install MySQL server:

yum install mysql mysql-community-server

After installation, you can set the initial settings in my.cnf:

# https://dev.mysql.com/doc/refman/8.0/en/validate-password-options-variables.html
default_authentication_plugin=mysql_native_password
validate_password.policy=0
validate_password.special_char_count=0

log_error=/var/log/mysqld.log
log_error_verbosity=3

disable_log_bin
innodb_flush_log_at_trx_commit = 2

innodb_file_per_table = 1

collation-server = utf8mb4_0900_ai_ci
character-set-server = utf8mb4

We start the server:

service mysqld start

After the first start, mysql will generate a temporary administrator password and save it to the log mysqld.log. You can display it in the console with the command:

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

Running MYSQL setup:

mysql_secure_installation -u root -p

mysql -u root -p

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';

Next, you need to update the path to mysqld in the configs ispmanager. The actual path to the executable file can be obtained with the command:

which mysqld
/usr/sbin/mysqld

We register the path in the file /usr/local/mgr5/etc/ispmgr.conf.d/mysql.conf:

path mysqld /usr/sbin/mysqld

Install in ispmanagerthe ВозможностиMySQL server section . After installation, you need to go to the section Службыand check what is сервер MySQLrunning, if not, run it.

Next, we connect a new server in the section Серверы баз данных. If there is no database server there, then it should be added. This may require resetting the MySQL root user password.

1 COMMENT

  1. This guide dont work in 2020, need some corrections:
    1) Don’t forget to delete /etc/my.cnf before installing mysql server
    2) Dont use password in mysql entering command
    3) Use only default my.cnf, dont modify like in instruction
    4) In mysql use this commands to allow ISPpanel connect new database server:

    ALTER USER ‘root’@’localhost’
    IDENTIFIED WITH mysql_native_password
    BY ‘password’;

    (change user, host and password to yours)

LEAVE A REPLY

Please enter your comment!
Please enter your name here