1

Downloaded the latest phpMyAdmin to be used on macOS 10.15 Catalina (local webserver), extracted the phpMyAdmin files to my web root.

During the setup I chose config authentication and now when I visit the setup page I'm getting some mysqli error.

I deleted the entire phpMyAdmin/ dir and wanted to start all over again. However to my surprise, the previously entered (incorrect) server details are still there.

I would assume the any config.inc.php would be saved within phpMyAdmin's own dir, but apparently it's saving this data somewhere else.

How/where can I find it, so I can delete it and truly start a complete new phpMyAdmin setup from scratch?

P.S. I already tried:

  • /etc/phpmyadmin/
  • /usr/local/phpmyadmin/
  • /usr/local/etc/phpmyadmin/
  • /usr/local/opt/phpmyadmin/

But neither of these dirs exist.

RocketNuts
  • 9,958
  • 11
  • 47
  • 88
  • Save yourself *immense* amounts of grief and just go get https://www.sequelpro.com/. It's free. – ceejayoz Apr 14 '20 at 14:28
  • @ceejayoz Thanks, just looked into that. However I can't seem to connect. Have done `brew install mysql` and `mysql.server start`, created a user + password + database using root, restarted the mysql server, and now trying to connect (just localhost) with SequelPro. But it keeps saying connection refused. Is there something more to initially setting up MySQL + connecting? – RocketNuts Apr 14 '20 at 14:37
  • You might try connecting to `127.0.0.1` instead of `localhost`. Also, try `mysql` via the command line. If that doesn't work, your problem isn't with Sequel Pro or phpMyAdmin. – ceejayoz Apr 14 '20 at 14:41
  • @ceejayoz Either with `127.0.0.1` or `localhost` it gives the same error: [screenshot](https://i.imgur.com/la6Wlt1.png) (that caching_sha2_password stuff, no idea what that is, I didn't install or configure anything related to that). Note that I did not check the SSL option. When checking it I have to supply key and certificate files which I don't have. I have filled in a username and password that I can connect with from the terminal using `mysql -u myname -p`. – RocketNuts Apr 14 '20 at 15:11
  • See https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded. – ceejayoz Apr 14 '20 at 15:12
  • 1
    @ceejayoz I have no idea what `ALTER USER … IDENTIFIED WITH mysql_native_password BY …` actually does (apparently a different kind of password hashing than whatever `CREATE USER … IDENTIFIED BY …` does by default) but it did the trick. I can now use Sequel Pro For sake of inner peace I would still like to know where phpMyAdmin saved the config details, but this is great, thanks again! – RocketNuts Apr 14 '20 at 15:44
  • Awesome, I'm glad that helped. :-) – ceejayoz Apr 14 '20 at 15:46

1 Answers1

1

If you've simply downloaded the phpMyAdmin file yourself and uncompressed it to your web root, then the config.inc.php file goes in that phpMyAdmin folder. If you've used brew or some other package manager, they each have their own location for configuration files, but that doesn't seem to be the case here.

It's not clear why the old server details have been retained, maybe your browser has cached the old page or something, but the only place that phpMyAdmin looks for the configuration is in the main folder. Is there a chance you're seeing the defaults, rather than some custom setting? (The defaults would be to use auth_type cookie connecting to host 'localhost').

What is the specific mysqli error message you're seeing?

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
  • I'll be damned, I really didn't expect the server settings to be cached or stored in cookies or something. I refreshed the page many times. But after explicitly wiping my localhost cookies and refreshing again, the faulty server entry was gone! Thank you :D – RocketNuts Apr 15 '20 at 14:00
  • Now with the entry gone I cannot reproduce the exact error anymore, but if I remember correctly it was something with 'mysqli_connect expecting a string as 4th parameter whereas null was given'. – RocketNuts Apr 15 '20 at 14:01
  • That shouldn't have happened, but sometimes weird things happen with browser caches and cookies. I'm glad you're back up and running. Sounds like the error was specifically related to the typo in your configuration, so now that you've got that cleared up the server is connecting happily. – Isaac Bennetch Apr 15 '20 at 14:44