[BlueOnyx:24362] Re: In mysql, user at localhost and user at 127.0.0.1 are different.

Michael Stauber mstauber at blueonyx.it
Sun Oct 4 10:30:06 -05 2020


Hi Tomohiro,

> In BlueOnyx's admin panel, I don't think 127.0.0.1 and localhost
> should be treated the same as the hostname of mysql.
> 
> The code that causes the problem
>         if ($sql_host == "localhost") {
>             $sql_host = "127.0.0.1";
>         }

Yeah, this was done deliberately and intentionally.

Starting with CentOS 7 the included MariaDB started to treat localhost,
 127.0.0.1 and ::1 differently - regardless what /etc/hosts said.

Like anyone else we would prefer to use <user>@<localhost>, but that no
longer worked in certain scenarios and also wrecked portability of MySQL
users when moved between BlueOnyx versions.

For that reason we've now hard-coded MySQL local credentials to
<username>@<127.0.0.1> instead to avoid these problems.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list