Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
10.5.9
-
macOS, Linux
Description
When installing MariaDB as a normal user, mysql_secure_installation fails when attempting to authenticate the root user (with an empty password).
This can be worked around by updating the make_config function to avoid writing the user and password lines if the provided root password is empty, as in the following alternate implementation (first if-statement added):
make_config() {
|
echo "# mysql_secure_installation config file" >$config |
echo "[mysql]" >>$config |
if [ ! -z "$rootpass" ]; then |
echo "user=root" >>$config |
esc_pass=`basic_single_escape "$rootpass"` |
echo "password='$esc_pass'" >>$config |
fi |
#sed 's,^,> ,' < $config # Debugging |
 |
if test -n "$defaults_file" |
then |
dfile=`parse_arg "$defaults_file"` |
cat "$dfile" >>$config |
fi |
}
|
I'm not sure if this is the proper fix, but hopefully it at least highlights where the conflict is happening.
Attachments
Issue Links
- relates to
-
MDEV-22486 mysql_secure_installation cannot work without root user in the database
- Open