cannot access myphpadmin

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

cannot access myphpadmin

Postby krist8 » 21. January 2024 19:15

Hi,
I installed XAMPP on macOS Sonoma 14.2.1. At this stage I can access on the web /localhost/myphpadmin showing the root user has blank password. Using command line, I created a database, piwigo. Then I used /localhost/myphpadmin to change the password to the database. Then, I loaded mysql database from my backup. I placed the piwigo server on htdocs (server and database has the same name). After some write permission corrections, my piwigo server (with all my photo albums) is working. Now I want to go in /localhost/myphpadmin but it gives me error

Code: Select all
Error
MySQL said: Documentation

Cannot connect: invalid settings.
 mysqli::real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)
 Connection for controluser as defined in your configuration failed.
 mysqli::real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)
 phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


Since the macOS manager-osx does not have features of the windows control panel, I do not know how to correct this.

Your help is much appreciated.

Edit, If I can change the password back to blank, maybe I can access /localhost/myphpadmin. But I searched and the methods used is on the control panel which manager-osx does not have. I cannot find any command line to change XAMMP mysql password.

edit2. I found the command and use this to alter the root password
Code: Select all
/Applications/XAMPP/bin/mysql --user=root --password -e "Alter User 'root'@'localhost' IDENTIFIED BY '""'"


Now I cannot access my database, since I have changed the password to "". What can I do in phpmyadmin to change the password back but also allow me to access /localhost/phpmyadmin?
krist8
 
Posts: 3
Joined: 21. January 2024 18:47
XAMPP version: 8.2.4
Operating System: macOS Sonoma 14.2.1

Re: cannot access myphpadmin

Postby Nobbie » 22. January 2024 14:29

Proceed to the folder which holds Phpmyadmin.

Edit the file config.inc.php (you probably have to run with admin rights)

Watch out for the line for auth_type:

Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'config';


Change 'config' to 'cookie'. Safe config.inc.php

Then start /localhost/phpmyadmin - you will be prompted for User and Password from now on, Phpmyadmin wont login automatically, instead with the credentials you provide in this dialog. Provide the correct values for User and Password (i.e. root and your new password).
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: cannot access myphpadmin

Postby krist8 » 26. February 2024 06:48

Nobbie wrote:Proceed to the folder which holds Phpmyadmin.

Edit the file config.inc.php (you probably have to run with admin rights)

Watch out for the line for auth_type:

Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'config';


Change 'config' to 'cookie'. Safe config.inc.php

Then start /localhost/phpmyadmin - you will be prompted for User and Password from now on, Phpmyadmin wont login automatically, instead with the credentials you provide in this dialog. Provide the correct values for User and Password (i.e. root and your new password).

Thanks for your help. As you directed, I put in the change and now it is working.
krist8
 
Posts: 3
Joined: 21. January 2024 18:47
XAMPP version: 8.2.4
Operating System: macOS Sonoma 14.2.1

Re: cannot access myphpadmin

Postby krist8 » 26. February 2024 06:48

Nobbie wrote:Proceed to the folder which holds Phpmyadmin.

Edit the file config.inc.php (you probably have to run with admin rights)

Watch out for the line for auth_type:

Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'config';


Change 'config' to 'cookie'. Safe config.inc.php

Then start /localhost/phpmyadmin - you will be prompted for User and Password from now on, Phpmyadmin wont login automatically, instead with the credentials you provide in this dialog. Provide the correct values for User and Password (i.e. root and your new password).

Thanks for your help. As you directed, I put in the change and now it is working.
krist8
 
Posts: 3
Joined: 21. January 2024 18:47
XAMPP version: 8.2.4
Operating System: macOS Sonoma 14.2.1


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 44 guests