# phpMyAdmin Problems; Can't Login [SOLVED]

## charliecompany

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.

----------

## xsteadfastx

 *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.
> ...

 

and how can i change that?

----------

## charliecompany

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.

----------

## Makido

Did you upgrade mysql ?

If yes... do the following step:

```

mysql_fix_privilege_tables --password=<your-password>

/etc/init.d/mysql restart

```

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

```

emerge -C phpmyadmin

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

```

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

```

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:

```

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)

```

/* !!! 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!)

```

$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:

```

mysql -u root -p

UPDATE mysql.user SET Password = PASSWORD('<put the numbers here>') WHERE User = 'pma';

FLUSH PRIVILEGES;

exit

```

Well done?

Regards,

Maik

----------

## newtonian

 *Makido wrote:*   

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

 

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  :Surprised: 

----------

## richard.scott

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:

```
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   :Confused: 

----------

## newtonian

 *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:
> 
> ```
> 1. Create config.inc.php. You can use the web-based installer:
> 
> ...

 

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,

----------

## lysergicacid

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 --> 

```

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 

```
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 : 

```
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  :Sad: 

----------

## newtonian

 *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?

----------

## lysergicacid

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

sorry didnt give mysql version  

```
 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.

----------

## newtonian

 *lysergicacid wrote:*   

> nope, this was a clean system build all was new nothing got touched hasnt ever been updated
> 
> sorry didnt give mysql version  
> 
> ```
> ...

 

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

----------

## lysergicacid

thank u for trying

but he couldnt even get mysql to start, mines fine its started & its got

```

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 ?

```

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  :Sad: 

----------

## newtonian

 *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 ?
> ...

 

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

```

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?

----------

## lysergicacid

no the pma pass from the config file doesnt work 

```
myth ~ # mysql -u pma -p

Enter password: 

ERROR 1045 (28000): Access denied for user 'pma'@'localhost' (using password: YES)

```

----------

## newtonian

 *lysergicacid wrote:*   

> no the pma pass from the config file doesnt work 
> 
> ```
> myth ~ # mysql -u pma -p
> 
> ...

 

I suggest doing this to fix it:

```

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.

----------

## LONGOBARD

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

P.S.: ÒÕÓÓËÉÍ ÐÒÉ×ÅÔ   :Wink: 

----------

## phaseburn

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...

----------

## lysergicacid

 *newtonian wrote:*   

>  *lysergicacid wrote:*   no the pma pass from the config file doesnt work 
> 
> ```
> myth ~ # mysql -u pma -p
> 
> ...

 

ok i ran thru what u said to do and was able to login 

```
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

----------

## newtonian

exactly where on your file system is your config.inc.php file?

----------

## lysergicacid

ok fixed with 

```
$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  :Smile: 

----------

