PMA Database ... not OK in phpMyAdmin upgrade - mysql

I have just been wrangling with phpMyAdmin and MySQL server on my Win8 PC IIS localhost (there was no connection between these, which I think was due to MySQL service not starting so I reinstalled MySQL and reran the config setup and reestablished a connection between them, which fixed that).
However phpMyAdmin advised an update which I did by overwriting the files with the new version and including the previous config file.
I now have:
The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.
and on clicking I get
PMA Database ... not OK [ Documentation ]
General relation features Disabled
When I click the link I get a http 404 page which gives this:
Physical path C:\inetpub\wwwroot\phpMyAdmin\pmadb
So what is the pmadb in phpMyAdmin and should I be bothered by this? As it stands I'm a bit fed up at having to have had to spend time tweaking all of this (ie it has not been a smooth trouble free event/install). Is it some DB for the old version or what? I do not think I created it!
I do not feel very bothered by this as hopefully I can setup my databases for my localhost IIS websites and press on with my webdeverry(!) but I don't really like having this unknown error and wouldn't mind fixing it/getting rid of it.

There are a few google links on this same issue that I have followed that have helped me fix this (I should have spent more time googling before posting!). So to solve the problem I needed to create a phpmyadmin database and import create_tables.sql and assign a new user with full privileges and then uncomment the config.inc.php file at:
/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = '';
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
and uncomment lines below
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
I also needed to add some lines from the new version config.sample.inc
There was a good link describing this I wanted to save but I had to clear my browser cache to reload localhost/phpMyAdmin and in doing so I lost my history & that link!
I know this explanation is not exactly described but I hope it may help anyone else who gets a similar issue after updating phpMyAdmin. I'm still not sure what all these features do but it is all fixed now, thanks!

As I'm not very good in English I used google translator, so any error I'm sorry ;)
Hello, I had this same problem and the solution:
After setting all phpmmyadmin, you need to run the file "create_tables" in the phpmyadmin sql console itself, found at: phpmyadmin\sql\create_tables.sql
After creating it you need to configure the file "config.inc", found on the phpmyadmin folder.
In it you include the following information equal to file "config.sample.inc" which is an example.
/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'localhost';
$cfg['Servers'][$i]['controluser'] = 'user';
$cfg['Servers'][$i]['controlpass'] = 'password';
/* Storage database and tables */
$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]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
Edit : ( suggested by #Greeso )
For new versions, you should also add :
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
Done, exit and reenter the session.

Quick fixing script that does the job in one command:
curl -O -k https://raw.githubusercontent.com/skurudo/phpmyadmin-fixer/master/pma.sh && chmod +x pma.sh && ./pma.sh
Read through the actual code in this repo link

I have found that there is another cause for this issue. If when you create the pmauser for phpmyadmin to use, if you forget to assign that user rights to the schema that permit modifying the phpmyadmin database, you'll get the same messages. The good news is that if you've logged in with root or similar privileges, you can just allow the pmauser to have select, insert, delete on the phpmyadmin schema and the problem should be fixed.

This will reinstall phpmyadmin:
sudo dpkg-reconfigure phpmyadmin
Original post

A bunch of years later, to anyone looking for how to just remove this annoying message and not enable the functionality, just add this line to your config:
$cfg['PmaNoRelation_DisableWarning'] = true;

For me the db phpmyadmin was missing, you can find the file create_tables.sql inside the phpmyadmin installation in the sql/ directory. You can use this file to rebuild your table.
From the command line, you can import that sql file.
# mysql -u root < create_tables.sql
Be careful this will probably overrwrite your data, dont run it until you move your old phpmyadmin table, if you have one intact already.

Related

Need to deploy the same Codeigniter Code in different Domains but with different Databases

I have a web application in Codeigniter. Now I want to use the same code and deploy on 100+ different domains.
So I am seeking for a solution where I can use the SAME Code (Stored somewhere on hosting) and connection of it with multiple DB, so that each new DOMAIN will have its own DATABASE but share the same code.
Reason why I need this: any updates done in the code will be applied to all the domains with their own database.
You have to make some minor changes in config.php and database.php under application/config.
In config.php
$protocol = isset($_SERVER["HTTPS"]) ? 'https://' : 'http://';
$config['base_url'] =$protocol.$_SERVER['HTTP_HOST']."/";
In database.php
Put all database connections in conditional statement
if ($_SERVER['HTTP_HOST'] == 'server1.com')
{
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'database1';
}
//for development server
else if ($_SERVER['HTTP_HOST'] == 'server2.com') {
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'database2';
}
Except this, all parameters will remain unchanged.
push your code to Github, add application/config/config.php & application/config/database.php to .gitignore and use git version control on server.
If you make changes in the code, you can do that on your localhost, push to git, and pull from server with git version control. (Don't update the code manually from server to prevent git conflict)

#1146 - Table 'phpmyadmin.pma_column_info' doesn't exist

I've recently just installed XAMPP and I'm pretty new to all of this. I was trying to open a new DB in phpmyadmin, but it wrote me this error - #1146 - Table 'phpmyadmin.pma_column_info' doesn't exist.
I looked it up on the web and it said that I need to run a query of create_tables.sqlon the DB "phpmyadmin", but everytime I click on that database it just errors me the same error as before - #1146 - Table 'phpmyadmin.pma_column_info' doesn't exist.
Can anyone help me with it?
Thanks, Dan
None of the answers above or on other posts worked.
I solved the issue by going into my file explorer and deleting the phpmyadmin directory. Then you can run create_tables.sql in phpmyadmin and it should all work from there.
phpmyadmin directory can be found in C:\xampp\mysql\data
create_tables.sql is in C:\xampp\phpMyAdmin\sql
Don't forget to restart xampp.
You will find create_tables.sql.gz file in /usr/share/doc/phpmyadmin/examples/` dir
Extract it, sudo file-roller create_tables.sql.gz and change pma_ prefix by pma__ or vice versa
Then import you new script SQL from phpmyadmin in your browser
sudo dpkg-reconfigure phpmyadmin
That's it.
This is an optional feature that require to create tables from create_tables.sql
You can disable it just edit the file config.inc.php and comment these lines:
$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';
Windows
If you're using xampp since php 5.6.19 or later on initial setup you need to drop the phpmyadmin database and recreate it using the scripts in
X:\xampp\phpMyAdmin\sql

phpMyAdmin configuration issues

I have just installed xampp server and after that i want to create my database via phpMyAdmin but i faced some configuration problems about these lines
$cfg['Servers'][$i]['users'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['usergroups'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['navigationhiding'] ... not OK [ Documentation ]
So i made some researchs, i have created missing tables such as users, usergroups and navigationhiding and also i made neccesary changes in config.inc.php file as follows
$cfg['Servers'][$i]['users'] = 'pma_users';
$cfg['Servers'][$i]['usergroups'] = 'pma_usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma_navigationhiding';
After all these changes nothing is fixed. What can i do to fix this problem ? Any help would be appriciated.
I think your best options would be to remove and re-install again. That saves you time.

$cfg['Servers'][$i]['users'] ... not OK

I recently upgraded from phpMyAdmin 3.5.3 to 4.1.4 and I'm having problems with some of the configuration storage settings. At least, it seems that I'm having problems. Maybe this is expected behavior but I want to be sure.
My Procedure:
Downloaded and extracted new phpMyAdmin and copied it to /srv/www/htdocs/ (The previous version is still there but uses a different directory name - I didn't want to remove it until I got the new version working)
Used the setup web GUI to create a new config.inc.php. I know that it says to copy the old one but I figured there might be new fields since this is a new major version. Also, when I was done, I verified that the old config.inc.php and the new one have the same values for identical fields. I then copied it to the phpMyAdmin root.
Ran examples/create_tables.sql and noticed that it did create some new tables in the phpmyadmin database.
Logged in successfully and most features seem to be working fine.
Here's what I'm not sure about. It gave me the message: "The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here." And when I click there it has the following complaints:
$cfg['Servers'][$i]['users'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['usergroups'] ... not OK [ Documentation ]
Configurable menus: Disabled
$cfg['Servers'][$i]['navigationhiding'] ... not OK [ Documentation ]
Hide/show navigation items: Disabled
I figured it was because there were not yet any entries for those in config.inc.php but even when I enter those lines with blank values into config.inc.php, I still get the same messages.
Maybe I'm misinterpreting this, but to me "not OK" indicates some kind of an error, not just that the value is being intentionally left blank. Is that correct? Did I miss something? Or is that phpMyAdmin's way of saying that it's not currently in use but that I have nothing to worry about?
All the other configuration storage features are marked as "OK" and "Enabled" - it's just these new ones (which weren't in 3.5.3) that are "not OK."
Is something wrong or is this the way it should be if I don't want to use those features?
You can:
Check a similar question PhpMyAdmin error with config file to see if any of those answers help.
Leave them blank to make phpMyAdmin use the default values.
e.g. $cfg['Servers'][$i]['usergroups '] = '';
http://wiki.phpmyadmin.net/pma/Config/Servers#usergroups
You can also manually look into phpmyadmin database to see in which table relevent data is stored
I ran into similar problem when trying to install a fresh copy of phpMyAdmin 4.1.13. It's because of the table name mapping issue.
Below the line:
$cfg['Servers'][$i]['password'] = 'password';
this is the code I ended up putting:
$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]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
Just upgraded to version 4.2.7 on my localhost. Found these steps at the button of the page linked from "The phpMyAdmin configuration storage has been deactivated. To find out why click here."
Quick steps to setup advanced features:
Create the needed tables with the examples/create_tables.sql.
Create a pma user and give access to these tables.
Enable advanced features in configuration file (config.inc.php), for example by starting from config.sample.inc.php.
Re-login to phpMyAdmin to load the updated configuration file.
Still had the problem but i added the following to my config.inc.php file
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
Re-login and check. It should work fine.
For me, re-logging in was changing the value of $cfg['Servers'][$i]['auth_type'] from 'config' to 'cookie' and then closing the browser.

Editing php.ini to allow certain features

Okay, so I've been testing and building a website on my computer through localhost. Everything works fine on my computer! I wanted to then upload it to my godaddy hosting account. Then I get an error. I am using json_decode as an argument for one of for each loops in my php. When I'm running my site through a hosting provider it tells me there is an invalid argument in the foreach() loop on like 43. So, I knew it had to do with my php.ini file, so I copied the one from my computer and pasted it in the php.ini file on godaddy, for my site. Then the foreach() loop worked! But, then all kinds of hell broke loose. Session problems and such. So, my question is, what do I need to add to make json_decode work?
Thanks
Here is my php.ini file with the hosting provider:
register_globals = off
allow_url_fopen = off
expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
extension=json.so
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
; Only uncomment zend optimizer lines if your application requires Zend Optimizer
support
;[Zend]
;zend_optimizer.optimization_level=15
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so
; -- Be very careful to not to disable a function which might be needed!
; -- Uncomment the following lines to increase the security of your PHP site.
;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
; phpinfo, exec, system, dl, fsockopen, set_time_limit,
;
You cant just replace the php.ini file because it has paths hard coded.
For example, with your session error, most likely the setting session.save_path is referencing a directory that doesn't exist or incorrect permissions.
Can you post the line of code that was on line 43? I am guessing that your local php.ini doesn't display the error whereas the godaddy config does.