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

Michael Stauber mstauber at blueonyx.it
Tue Oct 6 21:36:53 -05 2020


Hi Tomohiro,

> Change my question.
> 
> What is "certain scenarios"?
> 
> What is "these problems"?
> 
> It seems that BlueOnyx tried to replace localhost with 127.0.0.1 for that,
> but I would like to know the reason for that replacement.

I haven't had the time to look into this any further, as I'm currently
engaged in a couple of other issues of higher importance, sorry.

When I created BlueOnyx 5209R I encountered that MySQL user creation
with the usual "<username>@<localhost>" caused PHP scripts to be unable
to connect to MySQL using just the username and password. However, when
I created the users with "<username>@<127.0.0.1>" it worked.

Why is (was) that the case?

I don't have an answer to that. But I kept that mechanism in place for
5210R as well and there it also works just fine in the same way.

In the end it's not really *that* important. The GUI creates the MySQL
users and you can use them. Via web applications that are deployed by
the WebApp installer as well as in manually installed applications. Just
fill in the access details that the GUI reports for MySQL or MariaDB.

We do have usage scenarios for BlueOnyx 5209R and 5210R that involve
physical installs on real hardware as well as different forms of
virtualization such as VMware, Xen, VirtualBox, KVM, OpenVZ and others.
In fact many BlueOnyx installs run on OpenVZ, which does things "a
little different" and this is exactly where I encountered that
"<username>@<127.0.0.1>" works and "<username>@<localhost>" didn't.

However, "<username>@<127.0.0.1>" works *everywhere*, so this was a
compromise that I was happy to make. I'm not inclined to mess with this
mechanism again if there is a chance that it'll break stuff for OpenVZ
users.

I'll give it a look in the close future, but right now I have a couple
of other smoldering wrecks that I need to attend to.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list