How To : Install MySQL from Directadmin RPM

  Control Panel, Database

Recently, there are with the Directadmin custombuild for MySQL.

Below are an example of the error :


Downloading mysql/MySQL-shared-5.6.38-1..x86_64.rpm...
--2018-03-02 18:46:09-- http://69.162.69.58/services/custombuild/all/mysql/5.6/5.6.38/64-bit/MySQL-shared-5.6.38-1..x86_64.rpm
Connecting to 69.162.69.58:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-03-02 18:46:09 ERROR 404: Not Found.

Downloaded file /usr/local/directadmin/custombuild/mysql/MySQL-shared-5.6.38-1..x86_64.rpm does not exist or is empty after download
cwd is: /usr/local/directadmin/custombuild
Fileserver might be down, using the backup file server..
--2018-03-02 18:46:09-- http://69.162.69.58/services/custombuild/all/mysql/5.6/5.6.38/64-bit/MySQL-shared-5.6.38-1..x86_64.rpm
Connecting to 69.162.69.58:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-03-02 18:46:10 ERROR 404: Not Found.

1. This is because the URL in Custombuild using wrong URL with ‘….’ in the URL.


--2018-03-02 18:46:09-- http://69.162.69.58/services/custombuild/all/mysql/5.6/5.6.38/64-bit/MySQL-shared-5.6.38-1..x86_64.rpm

2. Therefore we need to download the RPM and install it manually, first you may download them using link below (For Centos 7)


wget http://files.directadmin.com/services/custombuild/all/mysql/5.7/5.7.20/64-bit/mysql-community-common-5.7.20-1.el7.x86_64.rpm
wget http://files.directadmin.com/services/custombuild/all/mysql/5.7/5.7.20/64-bit/mysql-community-devel-5.7.20-1.el7.x86_64.rpm
wget http://files.directadmin.com/services/custombuild/all/mysql/5.7/5.7.20/64-bit/mysql-community-embedded-5.7.20-1.el7.x86_64.rpm
wget http://files.directadmin.com/services/custombuild/all/mysql/5.7/5.7.20/64-bit/mysql-community-embedded-devel-5.7.20-1.el7.x86_64.rpm
wget http://files.directadmin.com/services/custombuild/all/mysql/5.7/5.7.20/64-bit/mysql-community-libs-5.7.20-1.el7.x86_64.rpm
wget http://files.directadmin.com/services/custombuild/all/mysql/5.7/5.7.20/64-bit/mysql-community-libs-compat-5.7.20-1.el7.x86_64.rpm
wget http://files.directadmin.com/services/custombuild/all/mysql/5.7/5.7.20/64-bit/mysql-community-server-5.7.20-1.el7.x86_64.rpm

3. Remove mariadb in current server


yum remove mariadb-libs

4. Install mysql using RPM


rpm -ivh mysql-community-common-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.20-1.el7.x86_64.rpm

5. Perform a MySQL service restart and MySQL should be running once all rpm are installed :


[root@hide custombuild]# service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
[root@hide custombuild]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2018-03-02 18:53:56 +08; 4s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 13050 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 12976 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 13054 (mysqld)
CGroup: /system.slice/mysqld.service
└─13054 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Mar 02 18:53:53 hide.small-dns.com systemd[1]: Starting MySQL Server...
Mar 02 18:53:56 hide.small-dns.com systemd[1]: Started MySQL Server.
[root@hide custombuild]#