phpmyadmin 5.0.2 with mysql 8
ryandesign at macports.org
Sun Oct 4 21:38:47 UTC 2020
On Oct 4, 2020, at 16:22, Murray Eisenberg wrote:
> On 4 Oct2020, at 4:29 PM, Ryan Schmidt wrote:
>> On Oct 4, 2020, at 10:27, Murray Eisenberg wrote:
>>> I’ve finally succeeded in upgrading from mysql 5.7 to mysql 8 (8.0.21) but now my existing phymyadmin 5.0.2 no longer allows me to log in as root.
>>> One dragon slayed; another appeared!
>>> Cannot log in to the MySQL server
>>> mysqli::real_connect() [<a href=‘Application\ Docs/Programming/PHP/phpmanual/mysqli.real-connect’>mysqli.real-connect</a>:
>>> (HY000/2002): No such file or directory.
>>> Connection for controluser as defined in your configuration failed.
>>> I’m particularly puzzled by that “No such file or directory” message, because the file Application\ Docs/Programming/PHP/phpmanual/mysqli.real-connect does exist: I installed the phymyadmin doc files to Application\ Docs/Programming/PHP/phpmanual.
>> It's just telling you that the function that had the error was mysqli::real_connect, and then it's telling you where the documentation for mysqli::real_connect can be found, in case you are the developer of the php script and need to refer to it to solve the problem. But you're not so that's not really relevant.
>> It's not telling us what "No such file or directory" refers to, but presumably it refers to the MySQL socket file that it's trying to use to connect to your database.
>> Per "port notes php74-mysql" (or whatever version of php you're using), you need to tell php where the socket file is by editing your php.ini file. The notes don't list the path for mysql8's socket but you already know where it is.
> I already have the socket file in /opt/local/etc/ph74/php.ini set to the one in my.cnf, namely, /opt/local/var/run/mysql8/mysqld.sock. And 7.4.11 is the php version in use.
> So I don’t think that’s the problem
"No such file or directory" from real_connect could only mean that it can't access the socket file, as far as I know. If you've told php where the socket file is in php.ini, then maybe the problem is that php cannot read the socket. Are its permissions such that php can read it? What about the directory it's in?
More information about the macports-users