Description:
When i create data directory manually (/var/lib/mysql) for RPM based installation, no default user created under system database mysql while if i delete /var/lib/mysql directory before installation all works as expected. This occurs on CentOS 5.9 with generic/rhel5 rpms.
How to repeat:
rpm -ivh MySQL-client-5.5.33-1.linux2.6.x86_64.rpm MySQL-devel-5.5.33-1.linux2.6.x86_64.rpm MySQL-embedded-5.5.33-1.linux2.6.x86_64.rpm MySQL-server-5.5.33-1.linux2.6.x86_64.rpm MySQL-shared-5.5.33-1.linux2.6.x86_64.rpm MySQL-shared-compat-5.5.33-1.linux2.6.x86_64.rpm MySQL-test-5.5.33-1.linux2.6.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [ 14%]
2:MySQL-devel ########################################### [ 29%]
3:MySQL-embedded ########################################### [ 43%]
4:MySQL-server ########################################### [ 57%]
5:MySQL-shared ########################################### [ 71%]
6:MySQL-shared-compat ########################################### [ 86%]
7:MySQL-test ########################################### [100%]
[root@centos59 oracle]# rpm -qa | grep -i mysql
MySQL-client-5.5.33-1.linux2.6
MySQL-shared-5.5.33-1.linux2.6
MySQL-devel-5.5.33-1.linux2.6
MySQL-server-5.5.33-1.linux2.6
perl-DBD-MySQL-3.0007-2.el5
MySQL-shared-compat-5.5.33-1.linux2.6
MySQL-embedded-5.5.33-1.linux2.6
MySQL-test-5.5.33-1.linux2.6
[root@centos59 oracle]# ps -ef | grep mysql
root 6641 2828 0 14:15 pts/0 00:00:00 grep mysql
[root@centos59 oracle]# ls -la /var/lib/mysql/mysql
total 8
drwx--x--x 2 mysql mysql 4096 Oct 4 01:52 .
drwxr-xr-x 4 mysql mysql 4096 Oct 4 02:04 ..
[root@centos59 mysql]# ps -ef | grep mysql
mysql 6647 2828 3 14:15 pts/0 00:00:00 /usr/sbin/mysqld --skip-grant-tables --user=mysql
[root@centos59 mysql]# ls -la /var/lib/mysql/mysql/
total 0
* Executed mysql_upgrade
[root@centos59 mysql]# /usr/bin/mysql_upgrade
Looking for 'mysql' as: /usr/bin/mysql
Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Running 'mysqlcheck with default connection arguments
Running 'mysqlcheck with default connection arguments
Running 'mysql_fix_privilege_tables'...
OK
* All necessaary MySQL system tables created but no default users created under MySQL system database.
-rw-rw---- 1 mysql mysql 9510 Oct 4 02:04 host.frm
-rw-rw---- 1 mysql mysql 0 Oct 4 02:04 host.MYD
-rw-rw---- 1 mysql mysql 2048 Oct 4 02:04 host.MYI
-rw-rw---- 1 mysql mysql 10630 Oct 4 02:04 user.frm
-rw-rw---- 1 mysql mysql 0 Oct 4 02:04 user.MYD
-rw-rw---- 1 mysql mysql 1024 Oct 4 02:04 user.MYI
mysql> select user,host from mysql.user;
Empty set (0.00 sec)