 |
Entropy.ch Discussion Forums Discussion forums about Mac OS X software development.
|
| View previous topic :: View next topic |
| Author |
Message |
mip
Joined: 20 May 2005 Posts: 3
|
Posted: Sat May 21, 2005 6:15 Post subject: phpmyadmin broken in Tiger? |
|
|
Hey gang,
I had been able to use phpmyadmin 2.6.1pl to admin my mysql 4.1.8 databases using Panther (all releases from 10.3.5 to 10.3.9), and then glibly upgraded to Tiger. Now, I can use the command line client to work on my databases, but can't get phpmyadmin to work:
#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client.
I've tried both the "cookies" auth method (which is what I had been using in Panther) and the "config" option, where I actually entered the username and password of the user. Neither of these succeeded.
Anyone else have this problem? I've searched google for hours, but seem to have missed the solution.
Thanks in advance,
M |
|
| Back to top |
|
 |
mip
Joined: 20 May 2005 Posts: 3
|
Posted: Sat May 21, 2005 17:55 Post subject: more info |
|
|
I'm using PHP 4.3.10. I tried upgrading to phpmyadmin 2.6.2-pl1, and that hasn't helped. I think I read something about a mismatch between the API used for the client with phpMyAdmin and server. I don't understand how that mismatch wouldn't have been a problem in Panther, but is a problem in Tiger. But maybe I'm just barking up the wrong tree.
MySQL is 4.1.8
If a downgrade is what I need (to a 4.0.x), what's the best way to do that without losing the work I've already done creating my tables and such? I've dumped the tables, so I suppose at worst I'd have to recreate the tables from those dump sql scripts.
Anyway - thanks in advance. This forum and website are fantastic resources.
M |
|
| Back to top |
|
 |
mip
Joined: 20 May 2005 Posts: 3
|
Posted: Wed May 25, 2005 20:17 Post subject: Re: more info |
|
|
| mip wrote: | I'm using PHP 4.3.10. I tried upgrading to phpmyadmin 2.6.2-pl1, and that hasn't helped. I think I read something about a mismatch between the API used for the client with phpMyAdmin and server. I don't understand how that mismatch wouldn't have been a problem in Panther, but is a problem in Tiger. But maybe I'm just barking up the wrong tree.
MySQL is 4.1.8
If a downgrade is what I need (to a 4.0.x), what's the best way to do that without losing the work I've already done creating my tables and such? I've dumped the tables, so I suppose at worst I'd have to recreate the tables from those dump sql scripts.
Anyway - thanks in advance. This forum and website are fantastic resources.
M |
Okay - here's the fix. In my case, it was indeed the password hashing issue. Eventhough my server and client were using the same hashing scheme, phpmyadmin was using an older one - hence the success via the command line, but failure via phpmyadmin.
I set my server to use the old password hash, since phpmyadmin uses it.
Here's the command:
| Code: | mysql> set password for 'someuser'@'somehost' = OLD_PASSWORD('password for this user');
Query OK, 0 rows affected (0.11 sec)
|
Now - that works for 'someuser' but not all users, so you'll have to run that command for any users you want to have access to mysql from phpmyadmin.
I then changed my config.ini.php to use cookies, and got this error:
Warning: main(./libraries/auth/cookies.auth.lib.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/phpMyAdmin/libraries/common.lib.php on line 1220
After poking around on google, I found someone had a similar problem. It turned out to be misspelling of cookie! In my case, I had 'cookies' rather than 'cookie'!
Anyway, all is well now. HTH someone else with similar problems.
M |
|
| Back to top |
|
 |
ryandesign

Joined: 09 Jan 2004 Posts: 182 Location: Austin, TX
|
Posted: Wed Jun 15, 2005 21:51 Post subject: |
|
|
Just to clarify a few things: phpMyAdmin has nothing to do with the problem. I feel the need to make sure everyone understands that, because I've used it for a long time, and am active in submitting bug reports and patches for it, and like it very much. There is absolutely no problem using it in Tiger or any other version of Mac OS X.
The problem is that you have MySQL 4.1.x, but the version of PHP that you have is compiled with MySQL libraries < 4.1, therefore your version of PHP cannot use MySQL 4.1's new authentication mechanism. The PHP 4.3.11 packages distributed on this site are still compiled with MySQL 3.23.x libraries and are therefore subject to this problem.
To correct the problem, you need to set everyone's password in the mysql.user table back to the old format, as you did. Then, to prevent the problem from ever occurring again, you need to activate the old_passwords option in the /etc/my.cnf file. Please RTFM or see more-recent posts on this message board for how to do that. |
|
| Back to top |
|
 |
theross
Joined: 03 Aug 2005 Posts: 2
|
Posted: Wed Aug 03, 2005 20:14 Post subject: Same issue |
|
|
I got the same problem....
Everything is working fine except phpmyadmin... using either "cookie" or the "config" option. I'm pretty sure its due to this password hash issue. When I try to login to phpmyadmin it just times out.
Using "old_passwords" in the my.cnf makes MySQL fail to start and actually stops it as soon as I save. Trying to start it after doesn't work, removing that line will allow it to start again.
Also tried:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('password') WHERE User = 'theuserinvolved';
This did not work, it took the command but phpadmin still times out.
I can login to mysql just fine with "mysql -u root -p and my root mysql password. Again everything else is working fine with our site which relies heavily on PHP and MySQL... I just can't get into phpmyadmin with any user.
I tried to create a new admin user will full privileges and I have the same problem, phpadmin just hangs on auth.
Any ideas? |
|
| Back to top |
|
 |
want2know
Joined: 02 Aug 2005 Posts: 4
|
Posted: Thu Aug 04, 2005 3:16 Post subject: |
|
|
I just installed PHP 4.3.11 on my Mac (I'm on 10.3. , and haven't yet gotten around to phpmyadmin. Is it better to wait until after I upgrade to Tiger to install phpmyadmin? |
|
| Back to top |
|
 |
ryandesign

Joined: 09 Jan 2004 Posts: 182 Location: Austin, TX
|
Posted: Thu Aug 04, 2005 10:51 Post subject: And now for something completely different |
|
|
| want2know wrote: | | I just installed PHP 4.3.11 on my Mac (I'm on 10.3.8), and haven't yet gotten around to phpmyadmin. Is it better to wait until after I upgrade to Tiger to install phpmyadmin? |
want2know: you can install phpMyAdmin before or after you upgrade to Tiger; it shouldn't much matter, since PMA is just a web site, and the OS upgrade won't touch that. But be aware of this: when I upgraded to Tiger, my httpd.conf in /etc/httpd was renamed to httpd.conf.user_modified and a new httpd.conf was installed. This is relevant because Marc's entropy.ch PHP installer modifies the httpd.conf to activate PHP, and you may have made other modifications to it for your own purposes. You should be prepared to reapply those changes to the new httpd.conf after the upgrade.
| theross wrote: | I got the same problem....
Everything is working fine except phpmyadmin... using either "cookie" or the "config" option. I'm pretty sure its due to this password hash issue. When I try to login to phpmyadmin it just times out. |
theross: The original poster could not use phpMyAdmin because his PHP's MySQL libraries were too old to talk to his new MySQL server with the new password hashing algorithm. It doesn't sound to me like you're having that problem. What exactly do you mean by "times out"? The browser tries for a minute and eventually says it cannot load the page, or what? What does the Apache error log say? (Usually this is in /var/log/httpd/error_log)
| Quote: | | Using "old_passwords" in the my.cnf makes MySQL fail to start and actually stops it as soon as I save. Trying to start it after doesn't work, removing that line will allow it to start again. |
What error occurs when MySQL fails to start? The error log should be in /usr/local/mysql/data in a file whose name ends with ".err"
| Quote: | Also tried:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('password') WHERE User = 'theuserinvolved';
This did not work, it took the command but phpadmin still times out. |
What do you mean, it did not work? Did it say it updated 1 row? Then it worked. Did you execute FLUSH PRIVILEGES afterwards? If you did, and phpMyAdmin still does not work, then we can be pretty sure that you're not having a problem relating to the password hash format.
| Quote: | I can login to mysql just fine with "mysql -u root -p and my root mysql password. Again everything else is working fine with our site which relies heavily on PHP and MySQL... I just can't get into phpmyadmin with any user.
I tried to create a new admin user will full privileges and I have the same problem, phpadmin just hangs on auth. |
If you're executing the mysql command-line client on the server machine, then I would fully expect that to work, since server and client are most likely the same version. That your PHP web site works is more interesting. Is it connecting to the MySQL server with the same username as phpMyAdmin? If not, can you try that? Or, compare the two accounts and see what the differences are? Or, try "mysql -u[your phpMyAdmin user] -p" on the command line and see if that works? I think that one of the two error logs above will be helpful in solving this problem, but if not, maybe this will help us further. |
|
| Back to top |
|
 |
theross
Joined: 03 Aug 2005 Posts: 2
|
Posted: Mon Aug 08, 2005 16:36 Post subject: Re: And now for something completely different |
|
|
Okay I have some more info, thank you ryanddesign for trying to help me with this issue. so..
My httpd log only gives this error when I try to login to phpmyadmin:
| Code: | [Mon Aug 8 11:08:42 2005] [error] PHP Notice: Undefined variable: cfgPmaAbsoluteUri in /Library/WebServer/Documents/phpmyadmin/libraries/auth/cookie.auth.lib.php on line 394
[Mon Aug 8 11:15:34 2005] [error] PHP Notice: Undefined variable: cfgPmaAbsoluteUri in /Library/WebServer/Documents/phpmyadmin/libraries/auth/cookie.auth.lib.php on line 96
[Mon Aug 8 11:15:40 2005] [error] PHP Notice: Undefined variable: cfgPmaAbsoluteUri in /Library/WebServer/Documents/phpmyadmin/libraries/auth/cookie.auth.lib.php on line 394 |
When I change it to use "config" instead of "cookie" I no longer get the above error. What it does is just sits there trying and trying to diplay the databases... It shows the "Welcome to phpMyAdmin 2.2.7-pl1 MySQL 4.0.21 Complete MySQL by Server Logistics running on localhost as root@localhost" and everything on the right frame, but nothing in the left frame where the database is.
What I did notice is it says "MySQL 4.0.21" doesn't Tiger come with 4.1? maybe I need to upgrade MySQL?
To answer your other questions, when I run:
| Code: | | UPDATE mysql.user SET Password = OLD_PASSWORD('password') WHERE User = 'theuserinvolved'; |
The result is:
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0
My MySQL logs don't say much but they do give these errors on start:
| Code: | 050808 11:08:13 mysqld started
050808 11:08:13 Warning: Setting lower_case_table_names=2 because file system for /Library/MySQL/var/ is case insensitive
050808 11:08:13 InnoDB: Started
050808 11:08:13 /Library/MySQL/libexec/mysqld: Can't create/write to file '/Library/MySQL/var/webserv.mylocaldomain.lan.pid' (Errcode: 13)
/Library/MySQL/libexec/mysqld: ready for connections.
Version: '4.0.21 Complete MySQL by Server Logistics' socket: '/tmp/mysql.sock' port: 3306 Source distribution |
Any extra help on this would be great.
Thanks |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|