Enabling configuration storage in phpMyAdmin - mysql

I have followed the directions, created a control user and database, ran the create_tables.sql script (after I modified it with the proper DB name), used the setup script to create a config file and filled out all the fields on the "Edit Server -> Configuration Storage" page. I moved the generated config file into the top level PMA directory.
I can use PMA fine, but the Configuration Storage features aren't working. The foreign key fields aren't hyperlinking to their respective entities in different fields. I've checked the configuration tables (pma_*), and they're all empty except for pma_recent, which has two entries (login attempts or something?).
I should note that I built the DB before installing phpMyAdmin, so is there some script or something I have to run for it to scan the current tables and find the foreign keys/links?
Thanks!

I always had the same problem. I could never get the pma configuration database to work. SQL history neither.
Now phpMyAdmin has browser storage, which luckily works. Except it's nagging me on every refresh [or new tab] to load the configuration from the browser storage.
I just rely on the php config, and put everything in there.

Configurations of phpMyAdmin is in the file config.inc.php and you can take a look on this file config.sample.inc.php

This solved the problem for me $cfg['QueryHistoryDB'] = true;
Thanks to http://sourceforge.net/p/phpmyadmin/bugs/3998/

Related

Configuration of pmadb... not OK Error in PhpMyAdmin

I know this question has been asked here a number of times, and I went through all the answers I could find but nothing seems to work for me.
I recently downloaded PhpMyAdmin and MySQL. Everything works fine except when I log into phpMyAdmin as a root user, I get this error:
"The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why.
When I click to find out why, I get this:
Configuration of pmadb... not OK
General relation features Disabled
Create a database named phpmyadmin and setup the phpMyAdmin configuration storage there.
The phpmyadmin database exists, however I do not know how to setup configuration storage there.
What I tried:
Uncommenting lines under /* User used to manipulate with storage / and / Storage database and tables */ in config.inc.php file - no luck.
Others also suggest creating a user 'pma'#'localhost' in create_tables.sql file but I cannot locate this file anywhere. I also created this user in the "user" table of "mysql" database, so it may do the same thing as creating it in create_tables.sql file.
Any suggestions will be greatly appreciated. Everything seems to be working fine, this error is just annoying. Thank you in advance!

Where can I find my mySQL database (using locate doesn't help)?

First ever Stack Overflow post, thanks for your time. Any constructive criticism on how to post better, please just let me know. I have done a search on my query and have found similar posts, but I was unable to use the information within them to resolve my problem.
I have created a mysql database using the terminal window in my Ubuntu system (which I am also new to, having been a lifelong windows user). I used the following code in the terminal window:
$ mysql -u root -p
Then once in mysql, I did the following
CREATE DATABASE securities_master;
USE securities_master;
I created a user and tables in the database using some other code, that doesn't seem relevant here, so I won't bother posting. However, I then decided I would like to take a look at the tables in the database, so I downloaded an SQLite browser. It was at this point that I realized I could not find my database file.
I tried to find the answer on previous stack overflow posts, and tried the suggestions of:
locate sqlite
locate .db
locate .sqlite
locate securities_master
But unfortunately, none of these showed the file I was looking for. The only place I can think of would be what is called the 'root' directory in my computer, but the Ubuntu file manager system won't let me view it because it says I don't have permissions. Is this where it might be?
Could someone shed some light on where I might be able to find this file/database? I know it is definitely there because if I try to CREATE it again, I get the message that it can't because it already exists.
Thanks again.
sqlite and mysql are two different databases. You can't use sqlite on a mysql database. sqlite is a single-file database, in which users just open the file and read and write to it, while mysql is a more traditional relational database system with a server and a client, where the server manages the database (which is generally in a directory of files), while the client just connects to the server.
Where the mysql database is located my depend on your system, but it's usually in /var/lib/mysql. You can look in /etc/mysql/my.cnf for the configuration file, which should have a datadir option that refers to where the actual data for the database is stored.
You can check my.ini file to see where the data folder is located.
Usually there is a folder {mysqlDirectory}/data
MySQL data storage:
Commands.frm
Commands.myd
Commands.myi
The *.frm files contain the table definitions. Your *.myi files are MyISAM index files. Your *.myd files contain the table data.
as mentioned in the answer before mine, mysql and sqlite are two different systems.
You mention you used the cmd line mysql to create the database and then wanted to view the tables. If you're simply trying to see which table are created, in the same command line you used to Create the database you can run show tables;
If you're after a GUI for this, we'd need a bit more context. Is this ubuntu system a remote server, or are you using the desktop version?
You say you're a long time windows user, If you're using windows locally, I personally like SQLWorkbench for accessing my remote mysql servers.
EDIT: I just re-read your post and realised you're using local ubuntu desktop so me mentioning remote was silly, my bad! However, SQLWorkbench does have a ubuntu version at https://dev.mysql.com/downloads/workbench/

Issues with Wordpress database from localhost1 to localhost2

Seen some other questions regarding this but not sure what I am doing wrong. Here is what I've done:
downloaded and unzipped a fresh install of wordpress to /Sites/wordpress
Started MAMP and set document root to above
Opened up phpmyadmin and created a new database named the same as the database I want to import. (I figured I did not need to change the url's in the older database because they will be the same on my computer? 'localhost/mysite')
Imported localhost1 database to newly created database
I know that user and password created are root, but I created an additional user and password to mimic what was in the wp-config of the original site (localhost1). I also changed localhost2's wp-config DB name, user, password to match that of localhost1 so that they are the same.
From this point I try and go to http://localhost:8888 or localhost/mysite but I basically get a 'This webpage is not available' screen as if I'm not online.
Any ideas?
This might have to do with variants serialized in the database even if the URL paths stay the same. Try taking the localhost1 database and migrating to localhost2 after using a serialization tool like this.
I realize you are not changing URL paths, however I've read that tables are all serialized so it's worth a try.
The problem in my opinion is not in the database, because WP will tell you if it is.
Problem must be in your local server configuration. In Windows I made different folder for different projects and access them like localhost/project1, localhost/project2 etc.
I don't know how are things in Mac, but must be the same. So try to start a fresh copy of WP in your new localhost, and then import database from first project.
When WP first starts creates .htaccess file with modrewrite, so you can also check current .htaccess file and rules there.

Wordpress querying wrong database

We have a site that was a development version at test.mydomain.com. I migrated it to www.mydomain.com. I exported the existing database, created a new one, imported, then changed the wp_config file to point to the new DB and changed siteurl and homeurl values. However, in wp_options (phpmyadmin) the values for siteurl and home continue to be test.mydomain.com. I can log into the Wordpress admin on mydomain.com but it's searching for post data in test.mydomain.com and not populating the posts in the editor.
Try deleting the .htaccess file then go to the permalinks page change to another permalink that is not selected this should force a .htaccess file to be created then you can change back. This might not work but as you have changed your database settings in the mysql I don't see why it will look at the old site url/database.
Install adminer plugin for wordpress this will let you change the database from the plugin and will allow for changing of the fields that did not change to point to my domain.com ..
Memcached (specifically object-cache.php in wp-content) is most likely at fault, just de-activate it

Magento Module install SQL not running

I have written a module that is refusing point blank to create the tables within my mysql4-install-1.0.0.php file....but only on the live server.
The funny thing is that on my local machine (which is a mirror of the live server (i.e. identical file structure etc)) the install runs correctly and the table is created.
So based on the fact that the files are the same can I assume that it is a server configuration and or permissions problem? I have looked everywhere and I can find no problems in any of the log files (PHP, MySQL, Apache, Magento).
I can create tables ok in test scripts (using core_read/write).
Anyone see this before?
Thanks
** EDIT ** One main difference between the 2 environments is that on the live server the MySQL is remote (not localhost). The dev server is localhost. Could that cause issues?
Is the module which your install script is a part of installed on the live server? (XML file in app/etc/modules/, Module List Module for debugging.)
Is there already a record in the core_resource table for your module? If so, remove it to set your script to re-run.
If you file named correctly? The _modifyResourceDb method in app/code/core/Mage/Core/Model/Resource/Setup.php is where this file is include/run from. Read more here
Probably a permissions issue - a MySQL account used by public-facing code should have as few permissions as possible that still let it get the job done, which generally does NOT allow for creating/altering/dropping tables.
Take whatever username you're connecting to mysql with, and do:
SELECT User, Host
FROM mysql.user
WHERE User='your username here';
This will show you the user#host combos available for that particular username, then you can get actual permissions with
show grants for username#host;
Do this for the two accounts on the live and devlopment server, which will show you what permissions are missing from the live system.
In the Admin->System->Advanced section is your module present and enabled?
Did you actually unpack your module to the right space, e.g. app/code/local/yourcompany/yourmodule ?
Do you have app/etc/modules/yourmodule.xml - I believe that this could be the overlooked file giving rise to your problem.
the cache could be the culprit, if you manually deleted the core_resource row for your module in order to make the setup sql run again, you have to also flush the cache
probably a difference between dev and production servers is cache settings, that would explain why you only see this in production
For me, the issue appeared using Windows for development. Linux system is case sensitive. In my config.xml the setup section was named camelCase while the folder was named all-lowercase. Making them the same made the script run.