PhpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. Mysqli_real_connect(): (HY000/1045): Access denied for user (using password: YES) To find out the exact cause of the problem, you need to look in the phpMyAdmin error message. The reasons for this problem with access to the phpMyAdmin web page can be different in different cases. If you use the non-standard version of the app, but the PRO one, then in the following steps, replace “MAMP” with “MAMP PRO”, respectively. I’m using version 5.1 of the MAMP app, but in your case there can be any other version of the MAMP app. When I try to access the phpMyAdmin web page located at localhost/phpMyAdmin/index.php, the following error message appears: Enter the newly-defined admin username and password.On my macOS devices I use MAMP app by appsolute GmbH for local web development. Finally, restart Apache: systemctl restart httpd Access phpMyAdmin with Updated CredentialsĢ. Just underneath the line labeled AddDefaultCharset UTF-8, add the following lines: Options +FollowSymLinks +Multiviews +IndexesĦ. htpasswd by editing /etc/httpd/conf.d/nf as follows: nano /etc/httpd/conf.d/nfĤ. Do so, and make a note of the password.ģ. ![]() You are prompted to enter and confirm an admin password. In a terminal window, enter the following: mkdir /etc/phpmyadmin htpasswd –c /etc/phpmyadmin/.htpasswd adminĢ. If you have multiple systems to allow, add a line for each IP address. ![]() Note: Replace your_system's_ip_address with the system’s actual IP address. Replace these lines with the following: Require ip your_system's_ip_address Find the following sections: Require all grantedģ. Open the nf file in a text editor (we will be using nano): sudo nano /etc/httpd/conf.d/nfĢ. Allow phpMyAdmin Only From a Specific IP Addressġ. This section will help you prevent unauthorized access to sensitive databases. You should now have a working phpMyAdmin utility. Step 5: Restrict Unauthorized Access to phpMyAdmin (Optional) Refresh the web browser phpMyAdmin page, and log in with your MySQL username and password. Replace password with the actual password you set when securing the MySQL installation.Ĥ. To bypass this measure, open the MySQL shell and alter the root user: mysql –u root –pĪLTER USER IDENTIFIED WITH myswl_native_password BY 'password' ģ. PhpMyAdmin has not been updated yet to use this authentication method.Ģ. This error occurs because MySQL 8.x upgraded the password authentication mechanism. "The server requested an authentication method unknown to the client." However, if you attempt to log in, an error message may appear: The browser should display the phpMyAdmin login page. ![]() Open a web browser, and navigate to the following URL: localhost/phpmyadmin Finally, restart the Apache service to apply the changes made in the configuration file: systemctl restart httpdġ. Save the file ( Ctrl+o) and exit ( Ctrl+x).Ĥ. Enter the following code: Alias /phpmyadmin /usr/share/phpmyadminģ. ![]() This creates a new, blank configuration file. Create an Apache configuration file: sudo nano /etc/httpd/conf.d/nfĢ. Next, create and set permissions on a temporary phpMyAdmin directory: mkdir /usr/share/phpmyadmin/tmp chown -R apache:apache /usr/share/phpmyadmin chmod 777 /usr/share/phpmyadmin/tmp Step 2: Configure Apache for phpMyAdminġ. Save the file ( Ctrl+o) and close ( Ctrl+x).ġ0.
0 Comments
Leave a Reply. |