# phpmyadin and mysql problem

## senzacionale

Now i update my sql to 4.1 and i have problem with mysql and phpmyadmin

```

 SQL query: DocumentationEdit

SELECT label, id

FROM `pmadb`.`PMA_bookmark`

WHERE dbase = 'db1'

AND (

user = 'root'

OR user = ''

)

ORDER BY label

MySQL said: Documentation

#1146 - Table 'pmadb.PMA_bookmark' doesn't exist

```

if i have pma in config.inc.php then i can't get into phpmyadmin if i delete it then it works but i get previous error

```

$cfg['Servers'][$i]['controluser']   = 'pma';       // MySQL control user settings

                                                    // (this user must have read-only

$cfg['Servers'][$i]['controlpass']   = '237441641029059876';

```

what is wrong here i can't find the problem myself!

----------

## gdi2k

I had to upgrade to MySQL 4.1 today too, and I can't get phpMyAdmin working either. Specifically, I can't login, despite entering the correct username and password. 

I've also tried this guide (by c4), but it's virtually the same as how I was doing it in the first place, so it didn't help. With MySQL 4.0 I didn't have any trouble getting this to work.

Has anyone got phpMyAdmin to work with MySQL 4.1?

Thanks,

GDI

----------

## senzacionale

i think that his must be some bug with phpmyadmin and mysql 4.1.*

In wondows works superb!

----------

## Poppenpopper

Hi all,

i'm not quite sure, but MySQL, as of version 4.1, uses a new encryption algorithm to store its passwords. Could that cause your problem?

Luckily, MySQL 4.1 has a feature to preserve backward compatibility by using the "old" encryption for your passwords. You can create an "old" password in the Terminal, using the MySQL command line interface:

SET PASSWORD FOR 'mysql_username'  = OLD_PASSWORD('password');  

Maybe it works? 

Lars

----------

## senzacionale

this would be normal if i will use php4 but i install php5 where encryption must work normally with mysql 4.1 and there is no need with old_password!

----------

## gdi2k

I got my problem sorted out. Unfortunately, I'm not exactly sure why it suddenly started working   :Confused: 

Things I did:

- Moved over to the new dev-lang/php ebuilds, and went up to PHP 5 (from 4.4)

- Ran mysql_fix_privilege_tables --password=root_password at various points.

- Did a revdep rebuild

- Used the latest 2.4.6_p1 phpmyadmin

If you need any more info, let me know.

GDI

----------

## Sabishii-ookami

I followed all the steps you did, changing over to php5, flushed mysql databases and started all over, revdep-rebuild, I have the latest phpmyadmin still gives me bad username or password. I can log in no problem using the console (mysql -u root -p), but I can't seem to get to log in with phpmyadmin. Getting frustrated...

Thanks for any help!

----------

## senzacionale

thnx gdi2k now working cool for me to. 

Sabishii-ookami did you try this

```

Update MySQL's grant tables and the pmadb database:

mysql -u root -p < /usr/share/webapps/phpmyadmin/VERSION/sqlscripts/mysql/VERSION_create.sql

So the phpMyAdmin database is added to the new MySQL database:

```

or read here

http://arcticalliance.se/pma.php

----------

## Sabishii-ookami

Yes I did follow all those guides. What is strange is my blog is working correctly (dotclear) which is in php and uses mysql. So that means PHP and MYSQL are working correctly together. Which further leads me to a problem with my phpmyadmin. I did checked myself and all the required database/tables are there (pmadb, etc.). Maybe I did something wrong... who knows. I just find it annoying having to type all the commands myself in the mysql prompt in order to add users and change privileges... used to point and click :p

----------

## Remmis

I had this problem running phpmyadmin 2.6.4-pl4, I could create databases and add tables etc, but if i tried to use the built-in SQL query dialog, it would pop up and say no database selected.  I later noticed at the bottom of most pages was the "1146 - Table 'pmadb.PMA_bookmark' doesn't exist"  error.  

After much frustration I found in the config.inc.php file that the default value for 

$cfg['Servers'][$i]['pmadb']  is "pmadb"  

However the create_tables.sql file creates a phpmyadmin table.  (Which according to the comments in the config.inc.php file is the default table name)  

For some reason the two places conflict.  All I ended up having to do was change "pmadb" to "phpmyadmin" for $cfg['Servers'][$i]['pmadb'] in the config.inc.php

Update:

The default config.inc.php also had the 'pma' part of all of the tables in uppercase, which the create_tables.sql did not not.

----------

