Page 1 of 1

MYSQL SECTION: "ROOT" PASSWORD not working with localhost

PostPosted: 02. October 2014 16:51
by damole
I just installed xampp-win32-1.8.3-3-VC11 but I cannot change the root password. I enter my password twice and click the password changing button and the message "The root password was successfully changed. Please restart MYSQL for loading these changes!" but when I stop and start MySQL in the XAMPP control panel and then click admin I am logged into myphpadmin without being asked for a password and the security section of localhost/xampp says no password has been set.

I've installed XAMPP many times before on many computers but this is the first time this has happened.

Any ideas?

Re: MYSQL SECTION: "ROOT" PASSWORD not working

PostPosted: 03. October 2014 09:31
by damole
I just realised that this is the first time using Windows 8.(1) as opposed to 7. I've been reading lots of posts which might point to an issue with how localhost works in Windows 8.

Re: MYSQL SECTION: "ROOT" PASSWORD not working

PostPosted: 10. October 2014 11:35
by damole
I found a line in securefunctions.php that tried to open the database with localhost instead of 127.0.0.1. When I changed this everything worked OK.

Original

Code: Select all
securefunctions.php:line 11    if (@mysql_connect("localhost", "root", "$currentpass")) {


changed
Code: Select all
        global $host;
        if (@mysql_connect($host, "root", "$currentpass")) {


where $host a previously defined and used variable has already been assigned the value "127.0.0.1".

Re: MYSQL SECTION: "ROOT" PASSWORD not working

PostPosted: 15. October 2014 08:14
by damole
The status page of my install was displaying, "MySQL database DEACTIVATED", after changing the code as below it now correctly shows as activated.

From ..\htdocs\xampp\mysql.php

Code: Select all
if (@mysql_connect("localhost", "pma", "")) {   


changed to

Code: Select all
if (@mysql_connect("127.0.0.1", "pma", "")) {