Bug #98644 Install Directory (/var/lib/mysql) Empty after Installation of MySQL Community
Submitted: 18 Feb 2020 9:59 Modified: 20 Feb 2020 1:31
Reporter: Samson Lin Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.7.29 OS:Red Hat (7.7)
Assigned to: MySQL Verification Team CPU Architecture:x86

[18 Feb 2020 9:59] Samson Lin
Description:
I tried to install MySQL Community v5.7.29 in Red Hat Enterprise v7.7.
I used rpm files on install. I got it done successfully at the first time. I needed to reset the root password.

But after reboot, I failed to login with the following error messages:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I found that under /var/lib/mysql, there was no mysql.sock file. So I changed the directory permission as follows:

# ll -d mysql
drwxr-x--x. 5 mysql mysql 4096 Feb 18 14:53 mysql
# chmod 755 mysql
# ll -d mysql
drwxr-xr-x. 5 mysql mysql 4096 Feb 18 15:14 mysql

I checked again and mysql.sock was created at once. I could login mysql using root with my updated password.

After another reboot, I encountered the same issue with the same error message. This time no luck. The directory permission had been changed but I still couldn't login.

Then I uninstalled the whole package using 'rpm -e'. I reinstalled MySQL v5.7.29 again. After reboot, it was much worser that there were no files under /var/lib/mysql.

Here is the result when I executed the following command:
# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: activating (start-pre) since Tue 2020-02-18 16:28:55 HKT; 11min ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Control: 1786 (mysqld_pre_syst)
Tasks: 2
CGroup: /system.slice/mysqld.service
└─control
├─1786 /bin/bash /usr/bin/mysqld_pre_systemd
└─2497 /usr/bin/python -Es /usr/sbin/semanage fcontext -a -e /var/lib/mysql /var/lib/mysql-keyring

Feb 18 16:28:55 jira_85x_sit systemd[1]: Starting MySQL Server...

How to repeat:
Uninstall all rpm files (rpm -evh) and reinstall all rpm files again (rpm -Uvh)
[18 Feb 2020 15:43] MySQL Verification Team
[root@centos7Template ~]# rpm -qa | grep -i mysql
mysql80-community-release-el7-1.noarch
[root@centos7Template ~]# ls -la /var/lib/my*
ls: cannot access /var/lib/my*: No such file or directory
[root@centos7Template ~]# yum install mysql-community-client
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirrors.daticum.com
 * extras: mirrors.daticum.com
 * updates: mirrors.daticum.com
base                                                                                                       | 3.6 kB  00:00:00
extras                                                                                                     | 2.9 kB  00:00:00
mysql-connectors-community                                                                                 | 2.5 kB  00:00:00
mysql-tools-community                                                                                      | 2.5 kB  00:00:00
mysql57-community                                                                                          | 2.5 kB  00:00:00
updates                                                                                                    | 2.9 kB  00:00:00
(1/7): base/7/x86_64/group_gz                                                                              | 165 kB  00:00:00
(2/7): mysql-connectors-community/x86_64/primary_db                                                        |  53 kB  00:00:00
(3/7): extras/7/x86_64/primary_db                                                                          | 159 kB  00:00:00
(4/7): mysql-tools-community/x86_64/primary_db                                                             |  69 kB  00:00:00
(5/7): mysql57-community/x86_64/primary_db                                                                 | 198 kB  00:00:00
(6/7): base/7/x86_64/primary_db                                                                            | 6.0 MB  00:00:01
(7/7): updates/7/x86_64/primary_db                                                                         | 6.7 MB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.29-1.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.29-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:5.7.29-1.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) >= 5.7.9 for package: mysql-community-libs-5.7.29-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-common.x86_64 0:5.7.29-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================
 Package                               Arch                  Version                       Repository                        Size
==================================================================================================================================
Installing:
 mysql-community-client                x86_64                5.7.29-1.el7                  mysql57-community                 26 M
Installing for dependencies:
 mysql-community-common                x86_64                5.7.29-1.el7                  mysql57-community                311 k
 mysql-community-libs                  x86_64                5.7.29-1.el7                  mysql57-community                2.5 M

Transaction Summary
==================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 29 M
Installed size: 116 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): mysql-community-common-5.7.29-1.el7.x86_64.rpm                                                      | 311 kB  00:00:00
(2/3): mysql-community-libs-5.7.29-1.el7.x86_64.rpm                                                        | 2.5 MB  00:00:00
(3/3): mysql-community-client-5.7.29-1.el7.x86_64.rpm                                                      |  26 MB  00:00:02
----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                             9.9 MB/s |  29 MB  00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : mysql-community-common-5.7.29-1.el7.x86_64                                                                     1/3
  Installing : mysql-community-libs-5.7.29-1.el7.x86_64                                                                       2/3
  Installing : mysql-community-client-5.7.29-1.el7.x86_64                                                                     3/3
  Verifying  : mysql-community-common-5.7.29-1.el7.x86_64                                                                     1/3
  Verifying  : mysql-community-libs-5.7.29-1.el7.x86_64                                                                       2/3
  Verifying  : mysql-community-client-5.7.29-1.el7.x86_64                                                                     3/3

Installed:
  mysql-community-client.x86_64 0:5.7.29-1.el7

Dependency Installed:
  mysql-community-common.x86_64 0:5.7.29-1.el7                     mysql-community-libs.x86_64 0:5.7.29-1.el7

Complete!
[root@centos7Template ~]#
[18 Feb 2020 15:45] MySQL Verification Team
[root@centos7Template ~]# ls -la /var/lib/my*
ls: cannot access /var/lib/my*: No such file or directory
[root@centos7Template ~]# yum install mysql-community-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.daticum.com
 * extras: mirrors.daticum.com
 * updates: mirrors.daticum.com
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.7.29-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================
 Package                               Arch                  Version                       Repository                        Size
==================================================================================================================================
Installing:
 mysql-community-server                x86_64                5.7.29-1.el7                  mysql57-community                175 M

Transaction Summary
==================================================================================================================================
Install  1 Package

Total download size: 175 M
Installed size: 765 M
Is this ok [y/d/N]: y
Downloading packages:
mysql-community-server-5.7.29-1.el7.x86_64.rpm                                                             | 175 MB  00:00:07
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : mysql-community-server-5.7.29-1.el7.x86_64                                                                     1/1
  Verifying  : mysql-community-server-5.7.29-1.el7.x86_64                                                                     1/1

Installed:
  mysql-community-server.x86_64 0:5.7.29-1.el7

Complete!
[root@centos7Template ~]# ls -la /var/lib/my*
/var/lib/mysql:
total 8
drwxr-x--x.  2 mysql mysql 4096 Dec 18 14:30 .
drwxr-xr-x. 31 root  root  4096 Feb 18 16:44 ..

/var/lib/mysql-files:
total 8
drwxr-x---.  2 mysql mysql 4096 Dec 18 14:30 .
drwxr-xr-x. 31 root  root  4096 Feb 18 16:44 ..

/var/lib/mysql-keyring:
total 8
drwxr-x---.  2 mysql mysql 4096 Dec 18 14:30 .
drwxr-xr-x. 31 root  root  4096 Feb 18 16:44 ..
[root@centos7Template ~]# ls -lad /var/lib/my*
drwxr-x--x. 2 mysql mysql 4096 Dec 18 14:30 /var/lib/mysql
drwxr-x---. 2 mysql mysql 4096 Dec 18 14:30 /var/lib/mysql-files
drwxr-x---. 2 mysql mysql 4096 Dec 18 14:30 /var/lib/mysql-keyring
[root@centos7Template ~
[18 Feb 2020 15:51] MySQL Verification Team
[root@centos7Template ~]# systemctl start mysqld.service
[root@centos7Template ~]# grep "temporary password" /var/log/mysqld.log
2020-02-18T15:47:54.361903Z 1 [Note] A temporary password is generated for root@localhost: .Yhlt?ok-5LE
[root@centos7Template ~]#
[root@centos7Template ~]# ls -la /var/lib/mysql
total 122952
drwxr-x--x.  5 mysql mysql     4096 Feb 18 16:48 .
drwxr-xr-x. 31 root  root      4096 Feb 18 16:44 ..
-rw-r-----.  1 mysql mysql       56 Feb 18 16:47 auto.cnf
-rw-------.  1 mysql mysql     1676 Feb 18 16:47 ca-key.pem
-rw-r--r--.  1 mysql mysql     1112 Feb 18 16:47 ca.pem
-rw-r--r--.  1 mysql mysql     1112 Feb 18 16:47 client-cert.pem
-rw-------.  1 mysql mysql     1676 Feb 18 16:47 client-key.pem
-rw-r-----.  1 mysql mysql      425 Feb 18 16:48 ib_buffer_pool
-rw-r-----.  1 mysql mysql 12582912 Feb 18 16:48 ibdata1
-rw-r-----.  1 mysql mysql 50331648 Feb 18 16:48 ib_logfile0
-rw-r-----.  1 mysql mysql 50331648 Feb 18 16:47 ib_logfile1
-rw-r-----.  1 mysql mysql 12582912 Feb 18 16:48 ibtmp1
drwxr-x---.  2 mysql mysql     4096 Feb 18 16:48 mysql
srwxrwxrwx.  1 mysql mysql        0 Feb 18 16:48 mysql.sock
-rw-------.  1 mysql mysql        5 Feb 18 16:48 mysql.sock.lock
drwxr-x---.  2 mysql mysql     4096 Feb 18 16:48 performance_schema
-rw-------.  1 mysql mysql     1680 Feb 18 16:47 private_key.pem
-rw-r--r--.  1 mysql mysql      452 Feb 18 16:47 public_key.pem
-rw-r--r--.  1 mysql mysql     1112 Feb 18 16:47 server-cert.pem
-rw-------.  1 mysql mysql     1680 Feb 18 16:47 server-key.pem
drwxr-x---.  2 mysql mysql    12288 Feb 18 16:48 sys
[root@centos7Template ~]#
[root@centos7Template ~]# mysql -uroot -p".Yhlt?ok-5LE"
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.29

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select @@version;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> set password="MySQLRul3z!";
Query OK, 0 rows affected (0.00 sec)

mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 5.7.29    |
+-----------+
1 row in set (0.00 sec)

mysql>
[18 Feb 2020 15:53] MySQL Verification Team
Hi,

I apologize for the inconvenience this might caused you but there is no bug that I can see it. MySQL will not initialize the system if the directories are already there but if you remove them initialization will proceed as expected.

kind regards
[19 Feb 2020 2:30] Samson Lin
I tried to repeat the procedure you showed me.

I performed the following first to uninstall mysql community version:
(1) Uninstalled mysql community version by 'rpm -evh'
(2) Delete mysql user and group by 'deluser mysql'.  Verify mysql not exists in /etc/passwd and /etc/group
(3) Delete all directories under /var/lib, including mysql*.  Verify mysql* not exist under /var/lib

Reboot server.  Start installing mysql v5.7.29.
(1) Install mysql
# rpm -Uvh mysql-community-client-5.7.29-1.el7.x86_64.rpm mysql-community-common-5.7.29-1.el7.x86_64.rpm mysql-community-devel-5.7.29-1.el7.x86_64.rpm mysql-community-embedded-5.7.29-1.el7.x86_64.rpm mysql-community-embedded-compat-5.7.29-1.el7.x86_64.rpm mysql-community-embedded-devel-5.7.29-1.el7.x86_64.rpm mysql-community-libs-5.7.29-1.el7.x86_64.rpm mysql-community-libs-compat-5.7.29-1.el7.x86_64.rpm mysql-community-server-5.7.29-1.el7.x86_64.rpm mysql-community-test-5.7.29-1.el7.x86_64.rpm
warning: mysql-community-client-5.7.29-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-common-5.7.29-1.e################################# [ 10%]
   2:mysql-community-libs-5.7.29-1.el7################################# [ 20%]
   3:mysql-community-client-5.7.29-1.e################################# [ 30%]
   4:mysql-community-server-5.7.29-1.e################################# [ 40%]
   5:mysql-community-devel-5.7.29-1.el################################# [ 50%]
   6:mysql-community-embedded-5.7.29-1################################# [ 60%]
   7:mysql-community-embedded-devel-5.################################# [ 70%]
   8:mysql-community-test-5.7.29-1.el7################################# [ 80%]
   9:mysql-community-libs-compat-5.7.2################################# [ 90%]
  10:mysql-community-embedded-compat-5################################# [100%]

(2) Start mysql service
# ps -ef|grep mysql
root     13246 12873  0 10:24 pts/0    00:00:00 grep --color=auto mysql
# systemctl start mysqld
[hold.....]

I opened another terminal and checked....
# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: activating (start-pre) since Wed 2020-02-19 10:24:22 HKT; 5min ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Control: 13274 (mysqld_pre_syst)
    Tasks: 2
   CGroup: /system.slice/mysqld.service
           └─control
             ├─13274 /bin/bash /usr/bin/mysqld_pre_systemd
             └─13527 /usr/bin/python -Es /usr/sbin/semanage fcontext -a -e /var/lib/mysql /var/lib/mysql-keyring...

Feb 19 10:24:22 jira_85x_sit systemd[1]: Starting MySQL Server...

mysql server keeps starting and cannot finish.  Nothing was written into /var/log/mysqld.log

# ll mysqld.log
-rw-r----- 1 mysql mysql 0 Feb 19 10:21 mysqld.log

I am using Red Hat Enterprise 7.7.
[19 Feb 2020 2:33] Samson Lin
Current status...
# ps -ef|grep mysql
root     13267 12873  0 10:24 pts/0    00:00:00 systemctl start mysqld
root     13274     1  0 10:24 ?        00:00:00 /bin/bash /usr/bin/mysqld_pre_systemd
root     13527 13274  0 10:27 ?        00:00:01 /usr/bin/python -Es /usr/sbin/semanage fcontext -a -e /var/lib/mysql /var/lib/mysql-keyring
root     13839 13320  0 10:32 pts/1    00:00:00 grep --color=auto mysql

mysql just keeps starting.....
[19 Feb 2020 2:34] Samson Lin
# cd /var/lib
# ll -d mysql*
drwxr-x--x 2 mysql mysql 6 Dec 18 21:30 mysql
drwxr-x--- 2 mysql mysql 6 Dec 18 21:30 mysql-files
drwxr-x--- 2 mysql mysql 6 Dec 18 21:30 mysql-keyring
# cd mysql
[root@jira_85x_sit mysql]# ll
total 0
[19 Feb 2020 2:37] Samson Lin
I disabled SELINUX

SELINUX=disabled

And I disabled firewalld as well.

● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Does it matter?
[19 Feb 2020 2:54] Samson Lin
After the putty terminal timeout, I logged in again.
I found mysqld was started!

# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-02-19 10:35:43 HKT; 6min ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 14058 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 13274 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 14060 (mysqld)
    Tasks: 27
   CGroup: /system.slice/mysqld.service
           └─14060 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Feb 19 10:24:22 jira_85x_sit systemd[1]: Starting MySQL Server...
Feb 19 10:35:43 jira_85x_sit systemd[1]: Started MySQL Server.

There are files created under /var/lib/mysql:
# ll
total 122952
-rw-r----- 1 mysql mysql       56 Feb 19 10:35 auto.cnf
-rw------- 1 mysql mysql     1680 Feb 19 10:35 ca-key.pem
-rw-r--r-- 1 mysql mysql     1112 Feb 19 10:35 ca.pem
-rw-r--r-- 1 mysql mysql     1112 Feb 19 10:35 client-cert.pem
-rw------- 1 mysql mysql     1680 Feb 19 10:35 client-key.pem
-rw-r----- 1 mysql mysql      425 Feb 19 10:35 ib_buffer_pool
-rw-r----- 1 mysql mysql 12582912 Feb 19 10:35 ibdata1
-rw-r----- 1 mysql mysql 50331648 Feb 19 10:35 ib_logfile0
-rw-r----- 1 mysql mysql 50331648 Feb 19 10:35 ib_logfile1
-rw-r----- 1 mysql mysql 12582912 Feb 19 10:35 ibtmp1
drwxr-x--- 2 mysql mysql     4096 Feb 19 10:35 mysql
srwxrwxrwx 1 mysql mysql        0 Feb 19 10:35 mysql.sock
-rw------- 1 mysql mysql        6 Feb 19 10:35 mysql.sock.lock
drwxr-x--- 2 mysql mysql     8192 Feb 19 10:35 performance_schema
-rw------- 1 mysql mysql     1676 Feb 19 10:35 private_key.pem
-rw-r--r-- 1 mysql mysql      452 Feb 19 10:35 public_key.pem
-rw-r--r-- 1 mysql mysql     1112 Feb 19 10:35 server-cert.pem
-rw------- 1 mysql mysql     1676 Feb 19 10:35 server-key.pem
drwxr-x--- 2 mysql mysql     8192 Feb 19 10:35 sys

It needs TIME!!!!!!  Installer must be patient to WAIT....

Ok.  I rebooted server again.
After reboot, I checked mysql status:

# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: activating (start-pre) since Wed 2020-02-19 10:49:33 HKT; 2min 49s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Control: 1786 (mysqld_pre_syst)
    Tasks: 2
   CGroup: /system.slice/mysqld.service
           └─control
             ├─1786 /bin/bash /usr/bin/mysqld_pre_systemd
             └─1831 /usr/bin/python -Es /usr/sbin/semanage fcontext -a -e /var/lib/mysql /var/lib/mysql-files

Feb 19 10:49:33 jira_85x_sit systemd[1]: Starting MySQL Server...

It kept starting AGAIN!!!  No mysql.sock and no mysql.sock.lock under /var/lib/mysql!
[19 Feb 2020 3:35] Samson Lin
I walked away to perform other tasks.  Now I logged on putty and found that mysqld started successfully.

# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-02-19 11:03:32 HKT; 31min ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 2685 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 1786 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 2688 (mysqld)
    Tasks: 27
   CGroup: /system.slice/mysqld.service
           └─2688 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Feb 19 10:49:33 jira_85x_sit systemd[1]: Starting MySQL Server...
Feb 19 11:03:32 jira_85x_sit systemd[1]: Started MySQL Server.

I don't know how long I should wait everytime when I restart mysqld to make it run!
[19 Feb 2020 3:45] Samson Lin
From the 'systemctl status mysqld' output, it shows mysqld requiring 14 mins to start!

Feb 19 10:49:33 jira_85x_sit systemd[1]: Starting MySQL Server...
Feb 19 11:03:32 jira_85x_sit systemd[1]: Started MySQL Server.

Why mysqld needs 14 mins to start? It is not normal!
[19 Feb 2020 3:58] Samson Lin
Another trial

# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-02-19 11:55:55 HKT; 54s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 3476 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 3249 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 3479 (mysqld)
    Tasks: 27
   CGroup: /system.slice/mysqld.service
           └─3479 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Feb 19 11:42:16 jira_85x_sit systemd[1]: Starting MySQL Server...
Feb 19 11:55:55 jira_85x_sit systemd[1]: Started MySQL Server.

mysqld required 13:39 min to start.
[19 Feb 2020 4:01] Samson Lin
/var/lib/mysqld.log content:

2020-02-19T03:42:06.814056Z 0 [Note] Giving 0 client threads a chance to die gracefully
2020-02-19T03:42:06.814093Z 0 [Note] Shutting down slave threads
2020-02-19T03:42:06.814109Z 0 [Note] Forcefully disconnecting 0 remaining clients
2020-02-19T03:42:06.814123Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2020-02-19T03:42:06.814198Z 0 [Note] Binlog end
2020-02-19T03:42:06.815053Z 0 [Note] Shutting down plugin 'validate_password'
2020-02-19T03:42:06.815078Z 0 [Note] Shutting down plugin 'ngram'
2020-02-19T03:42:06.815095Z 0 [Note] Shutting down plugin 'partition'
2020-02-19T03:42:06.815107Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2020-02-19T03:42:06.815118Z 0 [Note] Shutting down plugin 'ARCHIVE'
2020-02-19T03:42:06.815129Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2020-02-19T03:42:06.815173Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2020-02-19T03:42:06.815187Z 0 [Note] Shutting down plugin 'MyISAM'
2020-02-19T03:42:06.815220Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2020-02-19T03:42:06.815232Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2020-02-19T03:42:06.815242Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2020-02-19T03:42:06.815252Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2020-02-19T03:42:06.815262Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2020-02-19T03:42:06.815273Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2020-02-19T03:42:06.815283Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2020-02-19T03:42:06.815293Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2020-02-19T03:42:06.815304Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2020-02-19T03:42:06.815313Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2020-02-19T03:42:06.815323Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2020-02-19T03:42:06.815334Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2020-02-19T03:42:06.815344Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2020-02-19T03:42:06.815353Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2020-02-19T03:42:06.815362Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2020-02-19T03:42:06.815373Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2020-02-19T03:42:06.815383Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2020-02-19T03:42:06.815394Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2020-02-19T03:42:06.815404Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2020-02-19T03:42:06.815413Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2020-02-19T03:42:06.815423Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2020-02-19T03:42:06.815432Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2020-02-19T03:42:06.815442Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2020-02-19T03:42:06.815453Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2020-02-19T03:42:06.815463Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2020-02-19T03:42:06.815472Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2020-02-19T03:42:06.815482Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2020-02-19T03:42:06.815492Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2020-02-19T03:42:06.815501Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2020-02-19T03:42:06.815511Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2020-02-19T03:42:06.815520Z 0 [Note] Shutting down plugin 'InnoDB'
2020-02-19T03:42:06.815647Z 0 [Note] InnoDB: FTS optimize thread exiting.
2020-02-19T03:42:06.815800Z 0 [Note] InnoDB: Starting shutdown...
2020-02-19T03:42:06.916077Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2020-02-19T03:42:06.924820Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 200219 11:42:06
2020-02-19T03:42:08.152886Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2630777
2020-02-19T03:42:08.154549Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-02-19T03:42:08.154577Z 0 [Note] Shutting down plugin 'MEMORY'
2020-02-19T03:42:08.154584Z 0 [Note] Shutting down plugin 'CSV'
2020-02-19T03:42:08.154589Z 0 [Note] Shutting down plugin 'sha256_password'
2020-02-19T03:42:08.154593Z 0 [Note] Shutting down plugin 'mysql_native_password'
2020-02-19T03:42:08.154752Z 0 [Note] Shutting down plugin 'binlog'
2020-02-19T03:42:08.155024Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2020-02-19T03:55:55.263247Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.29) starting as process 3479 ...
2020-02-19T03:55:55.279213Z 0 [Note] InnoDB: PUNCH HOLE support available
2020-02-19T03:55:55.279250Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-02-19T03:55:55.279265Z 0 [Note] InnoDB: Uses event mutexes
2020-02-19T03:55:55.279273Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-02-19T03:55:55.279281Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-02-19T03:55:55.279287Z 0 [Note] InnoDB: Using Linux native AIO
2020-02-19T03:55:55.279587Z 0 [Note] InnoDB: Number of pools: 1
2020-02-19T03:55:55.279725Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-02-19T03:55:55.281374Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-02-19T03:55:55.289800Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-02-19T03:55:55.291692Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-02-19T03:55:55.303993Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2020-02-19T03:55:55.328870Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-02-19T03:55:55.328943Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-02-19T03:55:55.448813Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-02-19T03:55:55.449765Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2020-02-19T03:55:55.449784Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2020-02-19T03:55:55.450545Z 0 [Note] InnoDB: Waiting for purge to start
2020-02-19T03:55:55.500733Z 0 [Note] InnoDB: 5.7.29 started; log sequence number 2630777
2020-02-19T03:55:55.500944Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-02-19T03:55:55.501172Z 0 [Note] Plugin 'FEDERATED' is disabled.
2020-02-19T03:55:55.502197Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200219 11:55:55
2020-02-19T03:55:55.509200Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2020-02-19T03:55:55.509218Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2020-02-19T03:55:55.509997Z 0 [Warning] CA certificate ca.pem is self signed.
2020-02-19T03:55:55.510057Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2020-02-19T03:55:55.510594Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2020-02-19T03:55:55.510651Z 0 [Note] IPv6 is available.
2020-02-19T03:55:55.510665Z 0 [Note]   - '::' resolves to '::';
2020-02-19T03:55:55.510691Z 0 [Note] Server socket created on IP: '::'.
2020-02-19T03:55:55.542975Z 0 [Note] Event Scheduler: Loaded 0 events
2020-02-19T03:55:55.543178Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.29'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
[19 Feb 2020 6:20] Samson Lin
I assigned 4 core cpu (13 MHz) and 4G ram to the vmware server.
[19 Feb 2020 9:22] Samson Lin
Shut down server, increased ram from 4GB to 8GB, power on server.

# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-02-19 17:16:26 HKT; 4min 1s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 3053 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 1940 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 3057 (mysqld)
    Tasks: 27
   CGroup: /system.slice/mysqld.service
           └─3057 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Feb 19 17:04:31 jira_85x_sit systemd[1]: Starting MySQL Server...
Feb 19 17:16:26 jira_85x_sit systemd[1]: Started MySQL Server.

mysqld took 12 mins to start.
[19 Feb 2020 17:06] MySQL Verification Team
Hi Samson,

I apologize but I am not sure what the question is.

The reported bug, about empty installation directory, is obviously not a bug as you saw yourself.

With regards to the slow MySQL Server start, there are numerous reasons for slow MySQL server start but that is something you can discuss with our support team and they can help you make the MySQL Server start fast, it is not in any way related to this bug report.

What I can tell you that's "general" and not directly related to your case would be to
1. Consider 8.0.x
2. Initial start of the mysql is always slow as there is number of files that needs to be created. This is especially slow inside VM
3. Look at https://dev.mysql.com/doc/refman/5.7/en/optimizing-server.html
4. Consider VirtualBox if this is VM running on desktop (the fact it's own by Oracle is irrelevant here, I just personally noticed it performs much better when running VM on desktop) or Proxmox if that's a server for VM machines (again my personal preference, I run both wmvare and proxmox for testing purposes and I find proxmox performing considerably better on same hardware - not universally better, talking about running MySQL Server use case). I also noticed RedHat Virtualization is faster than VMWare but needs more testing on my part. This is a personal preference and something you might want to consider testing, not an official MySQL/Oracle suggestion.

and of course, contact the MySQL Enterprise Support team as they can get your MySQL server to be as fast as possible for the use case you have.

kind regards
Bogdan

p.s. What I shown you here copy paste from was VM inside Proxmox and mysqld installed and started inside 2 minutes.

[root@centos7Template ~]# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-02-19 18:04:14 CET; 1min 33s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 1005 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 988 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 1008 (mysqld)
   CGroup: /system.slice/mysqld.service
           └─1008 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Feb 19 18:04:12 centos7Template.localdomain systemd[1]: Starting MySQL Server...
Feb 19 18:04:14 centos7Template.localdomain systemd[1]: Started MySQL Server.
[root@centos7Template ~]# cat /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root@centos7Template ~]#
[19 Feb 2020 17:13] MySQL Verification Team
One additional thing. Benchmark your disk with something like

[root@centos7Template ~]# dd if=/dev/zero of=/var/lib/mysql/deleteme.random bs=1024 count=137216
137216+0 records in
137216+0 records out
140509184 bytes (141 MB) copied, 1.1036 s, 127 MB/s
[root@centos7Template ~]# dd if=/dev/zero of=/var/lib/mysql/deleteme.random bs=1024 count=137216 conv=sync
137216+0 records in
137216+0 records out
140509184 bytes (141 MB) copied, 1.12396 s, 125 MB/s
[root@centos7Template ~]#
[20 Feb 2020 1:31] Samson Lin
Please close this case.  Thank you.