Problem with phpMYAdmin & mySQL? *STILL NEED HELP*

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

Problem with phpMYAdmin & mySQL? *STILL NEED HELP*

Postby sweebez » 30. July 2008 21:42

Greetings,

I'm brand new to all of this scene, and my ultimate goal is to get oscommerce working with XAMPP. Right now, I cannot get into phpMYAdmin, because the error message says "Cannot load mcrypt extension. Please check your PHP configuration."

I look at phpinfo, and I think it is already enabled.
Just to be sure, here's the link to the php.ini file:
http://www.geocities.com/zacharysweebe/php-ini.txt

UPDATE: I made a sample file to test out mysql. This is the code:
Code: Select all
<?php
$conn = mysql_connect("localhost", "root", "*MYPASSWORD*");
$result = mysql_list_dbs($conn);
while($db_data = mysql_fetch_row($result)) {
echo "<b> $db_data[0]</b><br>";
}
?>

I get this error when running it:
"Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\xampp\htdocs\db.php on line 2"

What is going on???
Last edited by sweebez on 31. July 2008 15:35, edited 2 times in total.
sweebez
 
Posts: 3
Joined: 30. July 2008 19:52

Postby glitzi85 » 30. July 2008 22:36

Hi,

find this line in your php.ini:

Code: Select all
;extension=php_mcrypt.dll


and remove the Semicolon from the beginning of the line. Then restart your Apache and try it again.

Be sure to edit the correct php.ini File, phpinfo will say you which one you have to use.

glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby sweebez » 30. July 2008 22:45

Ok, I made the changes you suggested, and when I go to log into phpMYAdmin the "Cannot load mcrypt extension. Please check your PHP configuration." message is gone (Thanks!)
However, I still see this error:
Image
======================
When I run the code I listed before, I get the same error messages:

Code: Select all
"Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\xampp\htdocs\db.php on line 2

Warning: mysql_list_dbs(): supplied argument is not a valid MySQL-Link resource in C:\xampp\htdocs\db.php on line 3

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\db.php on line 4"

======================
When I run XAMPP's Demo CD Collection program now, I get this message:
Code: Select all
"Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\xampp\htdocs\xampp\cds.php on line 64

Could not connect to database!
Is MySQL running or did you change the password?"

It's right! I *did* change the password. I was told that I should add some passwords to secure the system.
The changes I made are visible here:
Image
It seems that after making these changes, these problems have arisen.

So any ideas now?
sweebez
 
Posts: 3
Joined: 30. July 2008 19:52

Postby sweebez » 02. August 2008 02:04

*bump*
sweebez
 
Posts: 3
Joined: 30. July 2008 19:52

Postby genu » 03. November 2008 23:57

same problem. this occurs when I switched the PHP to 4. Mcrypt shows up in phpinfo, but phpmyadmin returns: "Cannot log in to the MySQL server" when trying to login.
genu
 
Posts: 3
Joined: 19. September 2008 19:59

Postby Sharley » 04. November 2008 00:58

genu wrote:same problem. this occurs when I switched the PHP to 4. Mcrypt shows up in phpinfo, but phpmyadmin returns: "Cannot log in to the MySQL server" when trying to login.

I have just successfully swapped from php5 to php4 and back again using the .\xampp\php-switch.bat file without any issues at all including logging into phpMyAdmin on each swap, with and without a password and with mcrypt uncommented in my original .\xampp\apache\bin\php.ini file.

Make sure that all the XAMPP components are stopped including if you have them running as services.

I use the cookie method of authentication for phpMyAdmin in the .\xampp\phpMyAdmin\config.inc.php file - this seems to be the most stable for me.
Code: Select all
$cfg['Servers'][$i]['auth_type']     = 'cookie';      // Authentication method (config, http or cookie based)

Try using different methods by changing it (cookie and http work for me but not config), save the file then restart apache.

Let us know how you get on and maybe post any error messages that you may come across.

My test to see if your post was anything version related seems to be negative - I am currently using XAMPP 1.6.8 but I have not had any issues with switching even in the many previous versions I have used where switching was a feature of XAMPP.

http://www.apachefriends.org/en/xampp-windows.html#1171
http://www.apachefriends.org/en/xampp-windows.html#1172
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

Postby dp1 » 11. November 2008 14:19

I've just set up XAMPP 1.6.8 and I've had the same problem.
It appears to be caused by the MySQL password format changing. It would appear that the MySQL client library supplied with the php 4 configuration do not support the newer (post MySQL 4.1) passwords.
If, as I did, you created a root passwords using PHP 5 and XAMPP 1.6.8 you will not be able to login using PHP 4 to MySQL.

To fix this, switch back to PHP 5. Login to phpMyAdmin and for each user you've created a password for (including root) do the following:

Edit the user and change the password (can be the same password) using the "Password Hashing: MySQL 4.0 compatible" option instead of the "MySQL 4.1+" option.

You will find the password option in:
"privilidges section" and then edit each user using the icon at the end of each users details. The "change password" for that user is then listed with other options that can be changed.

Once you've done this you should be able to switch back to PHP 4 and then login correctly to phpMyAdmin (and the databases using your php scripts).

It worked for me.
dp1
 
Posts: 1
Joined: 11. November 2008 13:52


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 133 guests