48

Solution Guys...

FYI i am using xampp to use phpmyadmin. and this error happens during the process of creating a database on localhost. Below is the code for config.inc file under phpmyadmin directory:

<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE      AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'HTTP';
$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = 'password';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
//$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
//$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
//$cfg['Servers'][$i]['recent'] = 'pma_recent';
//$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

/*
 * End of servers configuration
 */

?>
Marco Sulla
  • 15,299
  • 14
  • 65
  • 100
Hoody
  • 2,942
  • 5
  • 28
  • 32

17 Answers17

80

i've resolved with

sudo dpkg-reconfigure phpmyadmin
Andrea Perdicchia
  • 2,786
  • 1
  • 20
  • 19
75

You have to run the create_tables.sql inside the examples/ folder on phpMyAdmin to create the tables needed for the advanced features. That or disable those features by commenting them on the config file.

Eduardo Reveles
  • 2,155
  • 17
  • 14
  • 4
    as i am a beginner, would you please be able to show me step by step as i am not sure about what to disable in the config file nor how to run create_tables.sql – Hoody Oct 07 '12 at 09:02
  • the error is resolved by commenting out the last 4 lines of the config.php file, as in 4 cfg statements. is that what u meant? – Hoody Oct 07 '12 at 09:28
  • 1
    That's an alternative, yes. For imorting the .sql file, you should go to the import tab on phpmyadmin and select that file, and then send the form. Just that :) – Eduardo Reveles Oct 07 '12 at 10:11
  • 24
    I found the create_tables.sq.gz file in /usr/share/doc/phpmyadmin/examples/ on Ubuntu – theczechsensation May 04 '13 at 20:44
  • 2
    If issue not solved: check twice if your pma__table_something does not have double underscore. String replace it with single in sql before executing, works. – Gundars Mēness Dec 12 '13 at 18:48
  • You can run on the shell: `locate create_tables.sql` to locate the script on your system. – Rémi Becheras Nov 07 '14 at 09:21
  • this link: https://raw.githubusercontent.com/phpmyadmin/phpmyadmin/master/examples/create_tables.sql – Vy Do Nov 08 '14 at 08:09
  • This solutions doesn't run in all cases, answer below by Andrea Perdicchia is the right one. sudo dpkg-reconfigure phpmyadmin – EnriMR Jan 21 '15 at 10:58
  • 1
    @EnriMR afaik, that solution only works if using a debian based distro (like ubuntu, or well, debian). But I agree, on those distros, that's the right choice. – Eduardo Reveles Jan 22 '15 at 00:43
19

"You have to run the create_tables.sql inside the examples/ folder on phpMyAdmin to create the tables needed for the advanced features. That or disable those features by commenting them on the config file".

/usr/share/doc/phpmyadmin/examples/

Only to complete de choosed answer, this is the path to the examples/ directory on Ubuntu.

Just use the import feature and choose "create_tables.sql.gz".

gvsrepins
  • 1,687
  • 2
  • 17
  • 20
15

I encountered the same problem but none of your answers solved it. But I found this link. I had to edit /etc/phpmyadmin/config.inc.php:

$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

into

$cfg['Servers'][$i]['pma__table_uiprefs'] = ‘pma__table_uiprefs’;

My problem was solved, hope it can help others.

kukinsula
  • 322
  • 4
  • 8
  • It should be "\_" not "\_\_". – Ryan Dec 19 '14 at 17:55
  • 1
    Actually Ryan, the double underscores ( `__` )is correct because that's the correct table name prefix used in the `create_tables.sql` file. Otherwise it won't work. That's what had happened with me. I had done everything except mind those two underscores in the table name prefix. – racl101 Jun 22 '15 at 01:07
15

You will find create_tables.sql.gz file in /usr/share/doc/phpmyadmin/examples/ dir

enter image description here

Extract it and change pma_ prefix by pma__ or vice versa

enter image description here

Then import you new script SQL :

enter image description here

Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
6

After I downloaded phpmyadmin from their website, I extracted the create_tables.sql file from the examples folder and then I imported it from the 'Import' tab of phpmyadmin.
It creates the database 'phpmyadmin' and the relevant table within.

This step might not be needed as the 12 tables were already there...
The problem seemed to be the double underscore in the tables' names.

I edited 'config.inc.php' and added another underscore (__) after the 'pma_' prefix of the tables.

ie.

$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';

became

$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';

This solved the issue for me.

doydoy44
  • 5,720
  • 4
  • 29
  • 45
6

Just to complete the answer - on Ubuntu/Mint you can just run:

zcat /usr/share/doc/phpmyadmin/examples/create_tables.sql.gz | mysql

(of course this assumes development environment where your default mysql user is root and you use no password; in other case use | mysql -uuser_name -p)

Kamil Dziedzic
  • 4,721
  • 2
  • 31
  • 47
3

You can solve it just in 1 second!

just use this url:

http://127.0.0.1/phpmyadmin/

instead of

http://localhost/phpmyadmin/
2

I shear the point made by user2237829. The table names in the create_tables script used a double underscore while the table names in the xampp example uses a single underscore.

2

This one just worked for me....

The error message displayed is:

“# 1146 – Table ‘phpmyadmin.pma_table_uiprefs’ doesn’t exist“

on your programme files,locate the configuration file config.inc.php phpmyadmin

Then trace the file $Cfg ['Servers'] [$ i] ['table_uiprefs'] = ‘pma_table_uiprefs’;

and replace it to the code : $cfg ['Servers'] [$ i] ['pma__table_uiprefs'] = ‘pma__table_uiprefs’;

restart your XAMMP and start localhost

solved.

Karthick Kumar
  • 2,349
  • 1
  • 17
  • 30
spashtech
  • 21
  • 3
1

This is a known bug on Linux Debian. I solved using the create_tables.sql in the official package and changing pma_ with pma__ inside /etc/phpmyadmin/config.inc.php

Marco Sulla
  • 15,299
  • 14
  • 65
  • 100
0

I also have same problem.. I tried everything solution in google, but still error.

But, now i resolved it.

I've resolved with make give double slash like that:

//$cfg['Servers'][1]['table_uiprefs'] = 'pma__table_uiprefs';

It works!!

Maks3w
  • 6,014
  • 6
  • 37
  • 42
0

I commented out the line with the following setting

$cfg['Servers'][1]['table_uiprefs'] 

Its not really an elegant solution, but it worked for my needs. (Just getting a basic PMA for running queries etc without UI customization).

Please do this only if you do not care about UI Prefs. If not, other people have answered this question very well.

narasi
  • 463
  • 3
  • 8
0

Edit:

$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; 

Change into:

$Cfg ['Servers'] [$ i] ['table_uiprefs'] = ‘pma_table_uiprefs’;

Then https://kamalkaur188.wordpress.com/category/removing-error-1146-table-phpmyadmin-pma_recent-doesnt-exist/ work for me.

Manjunath Ballur
  • 6,287
  • 3
  • 37
  • 48
0

The simpliest way is to drop database phpmyadmin and run sql/create_tables.sql script. Just login to mysql console and:

DROP DATABASE phpmyadmin;
\. {your path to pma}/sql/reate_tables.sql 
HONETi
  • 1
-1

Run

sudo dpkg-reconfigure phpmyadmin

in your unix/linux/Mac console

Mushtaq Jameel
  • 7,053
  • 7
  • 33
  • 52
Preity
  • 1
  • 1
-2

You can also find create_tables.sql file it phpMyAdmin's repo. Just import it from phpMyAdmin panel. It should work.

trejder
  • 17,148
  • 27
  • 124
  • 216
Dan
  • 1
  • `create_tables.sql` file is part of phpMyAdmin's **installation process**! You should not use in on an existing and working installation of pmA. Plus: You should never download a particular file from a repository. Always clone _entire_ repository! – trejder Jun 12 '14 at 13:59