Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
phpMyAdmin Problems; Can't Login [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
charliecompany
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2004
Posts: 106

PostPosted: Mon Apr 10, 2006 11:35 pm    Post subject: phpMyAdmin Problems; Can't Login [SOLVED] Reply with quote

I just upgraded phpMyAdmin from 2.7.0 to 2.8.0.2 and now I can't login. I have tried going from a clean start where I unmerged phpMyAdmin and MySQL and starting over. I followed the directions to set it up and I created a server using the setup script. When I try to login to phpMyAdmin, it just keeps asking for the username and password. I know the password and username that I am using are correct. I am able to login to mysql with them just fine.

Any ideas, suggestions?

Thanks.

I figured it out. Had to change the control user and password for the server.
_________________
The only difference between genious and stupidity is that stupidity has no limits.
Back to top
View user's profile Send private message
xsteadfastx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 132
Location: germany/belgium

PostPosted: Tue Apr 11, 2006 12:07 pm    Post subject: Re: phpMyAdmin Problems; Can't Login [SOLVED] Reply with quote

charliecompany wrote:
I just upgraded phpMyAdmin from 2.7.0 to 2.8.0.2 and now I can't login. I have tried going from a clean start where I unmerged phpMyAdmin and MySQL and starting over. I followed the directions to set it up and I created a server using the setup script. When I try to login to phpMyAdmin, it just keeps asking for the username and password. I know the password and username that I am using are correct. I am able to login to mysql with them just fine.

Any ideas, suggestions?

Thanks.

I figured it out. Had to change the control user and password for the server.


and how can i change that?
_________________
[ http://www.xsteadfastx.de ]
Back to top
View user's profile Send private message
charliecompany
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2004
Posts: 106

PostPosted: Tue Apr 11, 2006 3:40 pm    Post subject: Reply with quote

You are going to have to run the setup script again or go in and change config.inc.php in the phpmyadmin directory for apache.
_________________
The only difference between genious and stupidity is that stupidity has no limits.
Back to top
View user's profile Send private message
Makido
Tux's lil' helper
Tux's lil' helper


Joined: 01 Mar 2003
Posts: 98
Location: Berlin / Germany

PostPosted: Thu Apr 13, 2006 3:02 am    Post subject: Reply with quote

Did you upgrade mysql ?
If yes... do the following step:

Code:

mysql_fix_privilege_tables --password=<your-password>
/etc/init.d/mysql restart



Then unmerge your old (or not working newone) phpmyadmin!

Code:

emerge -C phpmyadmin
rm -rf /var/www/localhost/htdocs/phpmyadmin


Now, it's time to emerge your new blank phpmyadmin.

Code:

emerge -av phpmyadmin

this in one line:

mysql -u root -p < /usr/share/webapps/phpmyadmin/2.8.0.2/sqlscripts/mysql/2.8.0.2_create.sql


After that all, you must config it:

Code:

cd /var/www/localhost/htdocs/phpmyadmin/
mv ./libraries/config.default.php ./config.inc.php
(Attention! Don't forget the " . " ;) )
nano -w config.inc.php


In the config.inc.php:

Delet the following lines! (on top of the configuration)

Code:


/* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */

/* $Id: config.default.php,v 1.8 2005/12/16 14:07:10 lem9 Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:

/**
 * phpMyAdmin default configuration, you can copy values from here to your
 * config.inc.php
 *
 * All directives are explained in Documentation.html
 */


After that, note the "many many numbers", but it's better you copy it to your clipboard.
(I'm not sure thats important, but i did this step! and you should do it to!)

Code:

$cfg['PmaAbsoluteUri'] = 'http://localhost//phpmyadmin';
---> Change it to $cfg['PmaAbsoluteUri'] = '';

$cfg['Servers'][$i]['controlpass']   = '<many many numbers>';
---> Copy the numbers to your clipboard!

$cfg['Servers'][$i]['auth_type']     = 'http';
---> If authtype isn't "http", change it to this.


And now the last step with the clipboard-copied numbers:

Code:

mysql -u root -p
UPDATE mysql.user SET Password = PASSWORD('<put the numbers here>') WHERE User = 'pma';
FLUSH PRIVILEGES;
exit


Well done?

Regards,

Maik
_________________
Intel Q9550, 4096 MB DDRII-Ram, ATI Radeon HD3870, 1x750GB Samsung HD 7200 U/pm
Back to top
View user's profile Send private message
newtonian
Guru
Guru


Joined: 19 Jan 2005
Posts: 465
Location: Hokkaido Japan

PostPosted: Fri Apr 14, 2006 10:12 am    Post subject: Reply with quote

Makido wrote:
Did you upgrade mysql ?
If yes... do the following step:

Code:

mysql_fix_privilege_tables --password=<your-password>
/etc/init.d/mysql restart



Then unmerge your old (or not working newone) phpmyadmin!

Code:

emerge -C phpmyadmin
rm -rf /var/www/localhost/htdocs/phpmyadmin


Now, it's time to emerge your new blank phpmyadmin.

Code:

emerge -av phpmyadmin

this in one line:

mysql -u root -p < /usr/share/webapps/phpmyadmin/2.8.0.2/sqlscripts/mysql/2.8.0.2_create.sql


After that all, you must config it:

Code:

cd /var/www/localhost/htdocs/phpmyadmin/
mv ./libraries/config.default.php ./config.inc.php
(Attention! Don't forget the " . " ;) )
nano -w config.inc.php


In the config.inc.php:

Delet the following lines! (on top of the configuration)

Code:


/* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */

/* $Id: config.default.php,v 1.8 2005/12/16 14:07:10 lem9 Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:

/**
 * phpMyAdmin default configuration, you can copy values from here to your
 * config.inc.php
 *
 * All directives are explained in Documentation.html
 */


After that, note the "many many numbers", but it's better you copy it to your clipboard.
(I'm not sure thats important, but i did this step! and you should do it to!)

Code:

$cfg['PmaAbsoluteUri'] = 'http://localhost//phpmyadmin';
---> Change it to $cfg['PmaAbsoluteUri'] = '';

$cfg['Servers'][$i]['controlpass']   = '<many many numbers>';
---> Copy the numbers to your clipboard!

$cfg['Servers'][$i]['auth_type']     = 'http';
---> If authtype isn't "http", change it to this.


And now the last step with the clipboard-copied numbers:

Code:

mysql -u root -p
UPDATE mysql.user SET Password = PASSWORD('<put the numbers here>') WHERE User = 'pma';
FLUSH PRIVILEGES;
exit


Well done?

Regards,

Maik



Thanks, this fixed my "root with no password" error.

It would be cool if somebody turned this into a gentoo phpmyadmin howto wiki.
phpmyadmin isn't that tough to set up but a phpmyadmin specific gentoo wiki with this info would be very helpful :o
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Thu Apr 20, 2006 9:48 am    Post subject: Reply with quote

I've noticed in the current latest phpmyadmin-2.8.0.2 release that we are given the following advice at the end of the install:

Code:
1. Create config.inc.php. You can use the web-based installer:
   http://localhost//phpmyadmin/scripts/setup.php

   Alternatively, use the default config file in libraries/config.default.php:

     cp /var/www/localhost/htdocs/phpmyadmin/libraries/config.default.php /var/www/localhost/htdocs/phpmyadmin/libraries/config.inc.php


From what I can tell, the config.inc.php file should be cp'd to /var/www/localhost/htdocs/phpmyadmin/config.inc.php and not into the libraries
directory?

I hope this helps others :?
Back to top
View user's profile Send private message
newtonian
Guru
Guru


Joined: 19 Jan 2005
Posts: 465
Location: Hokkaido Japan

PostPosted: Thu Apr 20, 2006 10:38 am    Post subject: Reply with quote

richard.scott wrote:
I've noticed in the current latest phpmyadmin-2.8.0.2 release that we are given the following advice at the end of the install:

Code:
1. Create config.inc.php. You can use the web-based installer:
   http://localhost//phpmyadmin/scripts/setup.php

   Alternatively, use the default config file in libraries/config.default.php:

     cp /var/www/localhost/htdocs/phpmyadmin/libraries/config.default.php /var/www/localhost/htdocs/phpmyadmin/libraries/config.inc.php


From what I can tell, the config.inc.php file should be cp'd to /var/www/localhost/htdocs/phpmyadmin/config.inc.php and not into the libraries
directory?

I hope this helps others :?


Yes, I couldn't figure out why I kept being redirected to the phpmyadmin on my local machine.
After moving config.inc from libraries to phpmyadmin directory all the errors seem to have cleared up.

I found the bug in gentoo bugzilla here: https://bugs.gentoo.org/show_bug.cgi?id=129590

Thanks,
Back to top
View user's profile Send private message
lysergicacid
Guru
Guru


Joined: 25 Nov 2003
Posts: 352
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

PostPosted: Wed Apr 26, 2006 4:17 pm    Post subject: doesnt work here Reply with quote

hi all ive followed the steps above to the letter about 10 times in a row and its still the same i still cant login not with the user pma and the pass outa the config or my root user the pass outa the config or users pma or root with my mysql root pass, ive uninstalled phpmyadmin removed any bits it leaves and done this again and again nothing seems to work, also seem to be having problems with anything else connecting to the database ie verliadmin verlihubcontrollpanel etc nothing works yet i can login on the command line np something in my mysql config ? / something in mysql database cause ive tried everything and nothing works

verliadmin -->
Code:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /var/www/localhost/htdocs/VerliAdmin/lib/mysql.php on line 15
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)


& verlicontrolpanel give same errors
Code:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) in /var/www/localhost/htdocs/vhcp/inc/class.php on line 12

Error
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)


phpmyadmin just keeps asking the username and pass doesnt even take me to a failed screen

but the mysql server is runing :
Code:
myth ~ # mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15 to server version: 4.1.14-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


something very not right here but i cnt seem to figure it out, ive installed phpmyadmin a million times b4 and never had this much of a prob :(
_________________
[img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img]
Back to top
View user's profile Send private message
newtonian
Guru
Guru


Joined: 19 Jan 2005
Posts: 465
Location: Hokkaido Japan

PostPosted: Wed Apr 26, 2006 5:08 pm    Post subject: Re: doesnt work here Reply with quote

lysergicacid wrote:
hi all ive followed the steps above to the letter about 10 times in a row and its still the same i still cant login not with the user pma and the pass outa the config or my root user the pass outa the config or users pma or root with my mysql root pass, ive uninstalled phpmyadmin removed any bits it leaves and done this again and again nothing seems to work, also seem to be having problems with anything else connecting to the database ie verliadmin verlihubcontrollpanel etc nothing works yet i can login on the command line np something in my mysql config ? / something in mysql database cause ive tried everything and nothing works

something very not right here but i cnt seem to figure it out, ive installed phpmyadmin a million times b4 and never had this much of a prob :(


Did you recently upgrade mysql to 4.1 from 4.0?
Back to top
View user's profile Send private message
lysergicacid
Guru
Guru


Joined: 25 Nov 2003
Posts: 352
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

PostPosted: Wed Apr 26, 2006 5:13 pm    Post subject: Reply with quote

nope, this was a clean system build all was new nothing got touched hasnt ever been updated

sorry didnt give mysql version
Code:
 dev-db/mysql
    selected: 4.1.14
   protected: none
     omitted: none

cant run anything higher than 4 something cause it has mythtv on it too and dont think mythtv has been fixed to work with 5.x.x yet.
_________________
[img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img]
Back to top
View user's profile Send private message
newtonian
Guru
Guru


Joined: 19 Jan 2005
Posts: 465
Location: Hokkaido Japan

PostPosted: Wed Apr 26, 2006 5:57 pm    Post subject: Reply with quote

lysergicacid wrote:
nope, this was a clean system build all was new nothing got touched hasnt ever been updated

sorry didnt give mysql version
Code:
 dev-db/mysql
    selected: 4.1.14
   protected: none
     omitted: none

cant run anything higher than 4 something cause it has mythtv on it too and dont think mythtv has been fixed to work with 5.x.x yet.


The guys in this thread were getting similar mysql 4.1 socket errors.
It might shed some light.
https://forums.gentoo.org/viewtopic-t-439401-highlight-connect+mysql+socket.html
Back to top
View user's profile Send private message
lysergicacid
Guru
Guru


Joined: 25 Nov 2003
Posts: 352
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

PostPosted: Wed Apr 26, 2006 6:46 pm    Post subject: Reply with quote

thank u for trying
but he couldnt even get mysql to start, mines fine its started & its got
Code:

mysql> show databases;
+-------------+
| Database    |
+-------------+
| mysql       |
| mythconverg |
| pmadb       |
| test        |
| verlihub    |
+-------------+
5 rows in set (0.00 sec)

all working fine yet no matter what i try phpmyadmin or any other php based apps will connect to the databases, could it be due to this being set in the my.conf, personally i would of thought that the requests come off the server itself not the remote machine executing the resuests ?
Code:

bind-address            = 127.0.0.1

im only asking and havent tried to change this to the lanip of the server because im scared of messing with the server / even more mysql problems :(
_________________
[img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img]
Back to top
View user's profile Send private message
newtonian
Guru
Guru


Joined: 19 Jan 2005
Posts: 465
Location: Hokkaido Japan

PostPosted: Wed Apr 26, 2006 7:21 pm    Post subject: Reply with quote

lysergicacid wrote:
thank u for trying
but he couldnt even get mysql to start, mines fine its started & its got

all working fine yet no matter what i try phpmyadmin or any other php based apps will connect to the databases, could it be due to this being set in the my.conf, personally i would of thought that the requests come off the server itself not the remote machine executing the resuests ?
Code:

bind-address            = 127.0.0.1

im only asking and havent tried to change this to the lanip of the server because im scared of messing with the server / even more mysql problems :(


So just confirming, you can login from the command line as user pma?

Code:

mammoth phpmyadmin # mysql -upma -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 605 to server version: 4.1.14-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


on the second to last post here:
http://www.linuxquestions.org/questions/showthread.php?s=&threadid=313373
They talk about php not finding the mysql sock. That might be of some help.

At least it gives you hints on where to find where php is set to look for the sock and then find
out where the actual mysql.sock is.

What version of php are you running?
Back to top
View user's profile Send private message
lysergicacid
Guru
Guru


Joined: 25 Nov 2003
Posts: 352
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

PostPosted: Wed Apr 26, 2006 7:47 pm    Post subject: Reply with quote

no the pma pass from the config file doesnt work
Code:
myth ~ # mysql -u pma -p
Enter password:
ERROR 1045 (28000): Access denied for user 'pma'@'localhost' (using password: YES)

_________________
[img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img]
Back to top
View user's profile Send private message
newtonian
Guru
Guru


Joined: 19 Jan 2005
Posts: 465
Location: Hokkaido Japan

PostPosted: Thu Apr 27, 2006 12:36 pm    Post subject: Fixing login Reply with quote

lysergicacid wrote:
no the pma pass from the config file doesnt work
Code:
myth ~ # mysql -u pma -p
Enter password:
ERROR 1045 (28000): Access denied for user 'pma'@'localhost' (using password: YES)


I suggest doing this to fix it:


Code:

mysql -uroot -p
use mysql;
UPDATE `user` SET `Password` = PASSWORD( 'config.inc.php_file_password' ) WHERE User='pma';
flush privileges;
exit;


Then try to login again from the command line.
Back to top
View user's profile Send private message
LONGOBARD
n00b
n00b


Joined: 08 Jun 2004
Posts: 9
Location: Russia, SPb

PostPosted: Thu Apr 27, 2006 2:19 pm    Post subject: Reply with quote

îÁ ÄÁÎÎÙÊ ÍÏÍÅÎÔ ÐÏÌØÚÏ×ÁÔØÓÑ mysql5 × ÓÅÒØÅÚÎÙÈ ÐÒÏÅËÔÁÈ ÎÅ ÏÓÏÂÏ ÒÅËÏÍÅÎÄÕÅÔÓÑ, ÕÖ ÏÞÅÎØ ÓÙÒÏ×ÁÔ :)

P.S.: ÒÕÓÓËÉÍ ÐÒÉ×ÅÔ :wink:
Back to top
View user's profile Send private message
phaseburn
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 85
Location: Admin Land (Kernel Stack)

PostPosted: Thu Apr 27, 2006 5:38 pm    Post subject: Reply with quote

I had this problem too...

phpmyadmin 2.8.0.3 wouldn't log in at all... the pma password WAS correctly set, I could "mysql -u pma -p" from the command line with no problems (putting in the proper password, of course), same as root, and all of my other php-mysql scripts worked, just not phpmyadmin.

I had it set to http auth. MySQL gave me this error:

060427 10:23:48 7 Connect Access denied for user 'pma'@'localhost' (using password: YES)

This happened every time I tried to connect.

A downgrade to 2.7.0_p1 solved all my problems...
_________________
-PhaseBurn
Back to top
View user's profile Send private message
lysergicacid
Guru
Guru


Joined: 25 Nov 2003
Posts: 352
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

PostPosted: Thu Apr 27, 2006 11:44 pm    Post subject: Re: Fixing login Reply with quote

newtonian wrote:
lysergicacid wrote:
no the pma pass from the config file doesnt work
Code:
myth ~ # mysql -u pma -p
Enter password:
ERROR 1045 (28000): Access denied for user 'pma'@'localhost' (using password: YES)


I suggest doing this to fix it:


Code:

mysql -uroot -p
use mysql;
UPDATE `user` SET `Password` = PASSWORD( 'config.inc.php_file_password' ) WHERE User='pma';
flush privileges;
exit;


Then try to login again from the command line.

ok i ran thru what u said to do and was able to login
Code:
myth ~ # mysql -u pma -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 28 to server version: 4.1.14-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
however i still cant login to phpmyadmin with the pass as set from the config nor with my root user and his pass, even tho i can at least now login to any accounts on the commandline, ive tried everything in the php.config.inc too both whats allready there and changing it to my root user and pass for mysql still no go, OMFG its never been this much hassle b4 i remeber doing it last time and was a 5 min job if that i dont understand whats so different this time, php was compiled with session suport and mysql support everything should be right
_________________
[img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img]
Back to top
View user's profile Send private message
newtonian
Guru
Guru


Joined: 19 Jan 2005
Posts: 465
Location: Hokkaido Japan

PostPosted: Fri Apr 28, 2006 11:09 am    Post subject: Reply with quote

exactly where on your file system is your config.inc.php file?
Back to top
View user's profile Send private message
lysergicacid
Guru
Guru


Joined: 25 Nov 2003
Posts: 352
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

PostPosted: Sat Apr 29, 2006 1:12 pm    Post subject: Reply with quote

ok fixed with
Code:
$cfg['PmaAbsoluteUri'] = 'http://tuxpower//phpmyadmin';
$cfg['blowfish_secret'] = 'randomtxt';

/**
 * Server(s) configuration
 */
$cfg['Servers'][$i]['host']          = 'tuxpower'; // MySQL hostname or IP address
$cfg['Servers'][$i]['connect_type']  = 'socket';       // How to connect to MySQL server ('tcp' or 'socket')
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = 'root';       // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = 'thepass';
$cfg['Servers'][$i]['auth_type']     = 'cookie';      // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = 'thepass
god about time too lol :)
_________________
[img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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