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
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
When installing MariaDB as a normal user, {{mysql_secure_installation}} fails when attempting to authentication 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): {code:bash} 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 } {code} I'm not sure if this is the proper fix, but hopefully it at least highlights where the conflict is happening. |
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): {code:bash} 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 } {code} I'm not sure if this is the proper fix, but hopefully it at least highlights where the conflict is happening. |
Assignee | Anel Husakovic [ anel ] |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Assignee | Anel Husakovic [ anel ] | Sergei Golubchik [ serg ] |
Status | Confirmed [ 10101 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Anel Husakovic [ anel ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.4.18 [ 25110 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Not a Bug [ 6 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link | This issue relates to MDEV-22486 [ MDEV-22486 ] |
Workflow | MariaDB v3 [ 120185 ] | MariaDB v4 [ 159039 ] |