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?