Access phpmyadmin or update root password (serv2k3) [SOLVED]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Access phpmyadmin or update root password (serv2k3) [SOLVED]

Postby rvanherp » 05. November 2011 00:54

Finally I have xampp 1.7.7 running

But now I get this error on the site:
Code: Select all
Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file


My.cnf should in this case be my.ini right ??
But I don't know the line to add... is is just "old-passwords" are is the line longer.

Or how can I update the root password ??
I use a other username as root user but that should not be a problem. (I think)

I tried also "resetroot.bat"
But after editing the phpmyadmin config I get this errors

Code: Select all
#2000 Cannot log in to the MySQL server

Code: Select all
Connection for controluser as defined in your configuration failed.
rvanherp
 
Posts: 46
Joined: 27. November 2006 23:23
Location: Some where on the WWW or in a red truck
Operating System: Windows Server 2003

Re: Access phpmyadmin or update root password

Postby Sharley » 05. November 2011 01:08

Hello Richard,
Could you please update your profile to 1.7.7 as you are still showing 1.7.3.


When you reset the root password using the bat file there will be no password set so try and login with user root and no password - see below.

First, change this red line in the config.inc.php file found in the phpMyAdmin folder to either http or cookie
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
The other lines should look like the above.
Save the file and restart Apache and MySQL.

See if that helps you move forward.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Access phpmyadmin or update root password

Postby rvanherp » 05. November 2011 01:32

Don't think the .bat file did it's job...
some errors and I saw a aborting text.

So it's still not working :(
rvanherp
 
Posts: 46
Joined: 27. November 2006 23:23
Location: Some where on the WWW or in a red truck
Operating System: Windows Server 2003

Re: Access phpmyadmin or update root password

Postby Sharley » 05. November 2011 01:51

Because you are starting from scratch with 1.7.7 you should have a super user root for MySQL and PMA administration that is not used for any other databases you create.

Setting a new root user password is done in the http://localhost Security menu item.

If you changed the name of root to something else then the bat file won't work.

When you create a database then you should have a user/password specific for that database and only that database - do not use a super user (root) for individual databases as this can open up security issues.

Using the above Security menu item set a root password and try again to login as root with the new password.

If that fails then try the bat file again then try again to login with root no password.

We are trying to clear the error user/password credentials from that database.

There is another more complex way to remove user/pass explained here and you may need to change the instances of root to the username you changed root user to, if indeed you did change the root user name:
http://dev.mysql.com/doc/refman/5.5/en/ ... sions.html

Or because your installation of 1.7.7 is fairly new you might like to consider using the uninstall/reinstall method outlined in your previous topic so you have a clean fresh error free default configuration start.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Access phpmyadmin or update root password

Postby rvanherp » 05. November 2011 01:56

Because this is the real server I restored that data folder in the mysql folder.

I will try the link you included.
rvanherp
 
Posts: 46
Joined: 27. November 2006 23:23
Location: Some where on the WWW or in a red truck
Operating System: Windows Server 2003

Re: Access phpmyadmin or update root password

Postby Sharley » 05. November 2011 02:04

Sharley wrote:Could you please update your profile to 1.7.7 as you are still showing 1.7.3.
It is important for future troubleshooting so we know the correct versions we are dealing with.


Restoring the complete data folder is a bad move as the MySQL version in 1.7.3 is quite different to the version in 1.7.7.

Best to have used phpMyAdmin and exported your databases to an SQL file and then imported them into your 1.7.7 version.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Access phpmyadmin or update root password

Postby rvanherp » 05. November 2011 02:20

I'am making a backup now..
Hope I selected all the good settings :)
rvanherp
 
Posts: 46
Joined: 27. November 2006 23:23
Location: Some where on the WWW or in a red truck
Operating System: Windows Server 2003

Re: Access phpmyadmin or update root password

Postby rvanherp » 05. November 2011 03:38

This all should go easier...

I get e error every time :(

What do I not need to backup to make it go right,
and what ar the best settings to export the backup in ?
rvanherp
 
Posts: 46
Joined: 27. November 2006 23:23
Location: Some where on the WWW or in a red truck
Operating System: Windows Server 2003

Re: Access phpmyadmin or update root password

Postby Sharley » 05. November 2011 03:46

You could try this but you must be frustrated and very tired by now as it is very late over there :)

This will only work if you have a fresh install of 1.7.7 and you have tested that it all works by going to the http://localhost and the Welcome demo page and before you have made any changes to any configuration file - this default installation must work before proceeding.

Do you still have that copy of the data folder from 1.7.3?

Can you identify your own databases not the system databases?

The system databases that you must not copy or backup are:
cdcol
mysql
phpmyadmin
test

The others will have the names as your databases and these are the ones you can copy into your 1.7.7 mysql\data folder.

Now if your 1.7.7 installation is a fresh install and you have not edited any conf files you should be able to open phpMyAdmin using username root with no password and see your databases.

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Access phpmyadmin or update root password

Postby rvanherp » 05. November 2011 04:16

I got phpmyadmin working
and want to backup everything !

But when I restore I got a error about the information_schema
and privilages.

Now I'm so far that all the databases are back and I also restored the users.
(Databases my moving the data folders and the user by exporting the mysql\users table.
But i'm still getting the password error.

Code: Select all
Warning: mysql_connect() [function.mysql-connect]: Premature end of data (mysqlnd_wireprotocol.c:553) in D:\htdocs\stats\write_logs.php on line 37

Warning: mysql_connect() [function.mysql-connect]: OK packet 1 bytes shorter than expected in D:\htdocs\stats\write_logs.php on line 37

Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in D:\htdocs\stats\write_logs.php on line 37

Can not connect to database in count.php: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file
rvanherp
 
Posts: 46
Joined: 27. November 2006 23:23
Location: Some where on the WWW or in a red truck
Operating System: Windows Server 2003

Re: Access phpmyadmin or update root password

Postby Sharley » 05. November 2011 04:20

Try this:
In the mysql bin folder is mysql_upgrade.exe file.

With MySQL running run this exe file to update your databases, it will not harm them (you have a backup anyway).
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Access phpmyadmin or update root password

Postby Sharley » 05. November 2011 04:26

Also can you set a new password in your scripts that would overwrite those in the database when you save the script's configuration file?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Access phpmyadmin or update root password

Postby rvanherp » 05. November 2011 04:30

Sharley wrote:You could try this but you must be frustrated and very tired by now as it is very late over there :)


Yes it is :)

Sharley wrote:you should be able to open phpMyAdmin using username root with no password and see your databases.


Yes this what I have now, But If I add a new user and five it all the right I can't login to the phpmyconfig
And sripts on the sites can't access also...

BTW. I did some small editing in the config files to match the htdocs patch
and added the victual hosts.

I ran mysql_upgrade.exe and see no changes.

What do you mean with you last post?
Sharley wrote:Also can you set a new password in your scripts that would overwrite those in the database when you save the script's configuration file?

I tried to make a new pass and put the new pass in the config file from on the site.
if thats what you mean.
rvanherp
 
Posts: 46
Joined: 27. November 2006 23:23
Location: Some where on the WWW or in a red truck
Operating System: Windows Server 2003

Re: Access phpmyadmin or update root password

Postby Sharley » 05. November 2011 04:38

Yes that's what I meant but if that fails then read on.

I am a little worried that your scripts are not compatible with the new PHP/MySQL versions and has been the topic of a few posts when people used 1.7.7 with older scripts that had not been updated by their author - but you would have to wait for our resident PHP guru Altrea to see if he can work out your latest error messages when he next logs in (resident in Germany).

But good to see that XAMPP has now been tamed and you are on the move forward, just these script issues to sort now.

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Access phpmyadmin or update root password

Postby rvanherp » 05. November 2011 04:47

I tryed to view more and think that PHPfusion should work with the new version.
But also get a error

Code: Select all
Unable to establish connection to MySQL
1044 : Access denied for user ''@'localhost' to database 'FW'
rvanherp
 
Posts: 46
Joined: 27. November 2006 23:23
Location: Some where on the WWW or in a red truck
Operating System: Windows Server 2003

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 31 guests