mysql_install_db in rpm postinst fails with invalid user mysql
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Invalid
|
Undecided
|
Unassigned | ||
5.1 |
Invalid
|
Undecided
|
Unassigned | ||
5.5 |
New
|
Critical
|
Alexey Bychko | ||
5.6 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
the command "/usr/bin/
should be run after user mysql is created.
because post/pre script are not with "set -e" this does not cause the installation to fail. it reports the packages installed, but mysql database datafiles are not initialized (no content in /var/lib/
this could be temporary "bypass" by
* reinstalling the package twice
* manualy using mysql_install_db and changing ownership of datadir
current state int he package is:
if [ ! -d $mysql_datadir/test ]; then
mkdir $mysql_
fi
/usr/bin/
fi
# -------
# Make MySQL start/shutdown automatically when the machine does it.
# -------
...
... SNIP
...
# -------
# Create a MySQL user and group. Do not report any problems if it already
# exists.
# -------
groupadd -r mysql 2> /dev/null || true
useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" \
-g mysql mysql 2> /dev/null || true
# The user may already exist, make sure it has the proper group nevertheless
# (BUG#12823)
usermod -g mysql mysql 2> /dev/null || true
affected package is: Percona- Server- server- 55-5.5. 30-rel30. 2.500.rhel6. x86_64