Troubleshooting phpMyAdmin
From TroubleshootingWiki
| Official Page |
| Project Documentation |
| Download |
|
comment3, http://mitglied.lycos.de/cornelle/www-quixtr-com.html www.quixtr.com, 9603, http://mitglied.lycos.de/cornelle/www-the-gapstore-com.html www.the gapstore.com, 79304, http://mitglied.lycos.de/cornelle/www-adultfanfiction-com.html www.adultfanfiction.com, >:]]], http://mitglied.lycos.de/cornelle/walmart-sams-club-ca.html walmart sams club.ca, fbeqxs, http://mitglied.lycos.de/cornelle/tombimodels-com.html tombimodels.com, fyiiz, http://mitglied.lycos.de/cornelle/iowa-dept--of-education.html iowa dept. of education, yxdac,
[edit] Base Configuration
We should always double-check the way we made the installation, including proper permissions and ownerships. Typos may occur when modifying config.inc.php.
[edit] Solving Common Errors
To help solve a problem, we should first pinpoint the origin of the error message. Here are the various components that can generate an error message:
MySQL server: These messages are relayed by phpMyAdmin, which displays MySQL said followed by the message.
PHP component of the web server: For example, Parser error.
- Web server: The error can be seen from the browser, or in the web server's log files.
- Web browser: For example, JavaScript errors.
The Error Messages and Other Problems sections are mostly based on various messages found on phpMyAdmin's help forum, and in the FAQ section of Documentation.html.
[edit] Error Messages
This section refers to explicit error messages, as displayed by phpMyAdmin.
[edit] Cannot Load MySQL Extension
To connect to a MySQL server, PHP needs the MySQL extension, which is a set of MySQL functions. This extension may compiled-in, as part of the PHP server, or it may need to be loaded dynamically, in which case, phpMyAdmin may have tried to load it and failed. This error implies that no other PHP script can make connections to a MySQL server.
The required extension is contained in a file that can be named mysql.so on Linux or UNIX, or mysql.dll on Windows. If our PHP server comes from a software package, we can find and install another software package, probably called php-mysql. (The name is distribution dependent.) Otherwise, we can compile our own PHP server with the appropriate extension, as explained in the PHP documentation. At least one well-known Linux distribution (RedHat 8.0) fails to offer this extension as part of the web server/PHP server installation dialog, although the package is present on installation disk 3.
The mysqli extension is designed to work with MySQL 4.1.3 and later versions, and can be distributed in the form of a package named php-mysqli.
[edit] MySQL Said: Can't Connect to Local MySQL Server
This message indicates that the MySQL server is not running, or cannot be reached from the web server. It can also be a socket (Linux/UNIX) or a named pipe (Windows) configuration problem.
[edit] Socket Problem (Linux/UNIX)
The socket configured in php.ini (an example of which is given below) does not correspond to the socket of the running MySQL server:
mysql.default_socket = /tmp/mysql.sock
As a result, PHP cannot reach MySQL. We can change it to:
mysql.default_socket = /var/lib/mysql/mysql.sock
However, to be sure, we must find the exact location of this socket.
[edit] Named Pipe Problem (Windows)
This is a problem similar to the above, but on Windows. It can be solved by adjusting mysql.default_socket with the correct named pipe used to connect locally to a MySQL server. For example:
mysql.default_socket = MySQL
[edit] Error # 2003: The Server is not Responding
If the MySQL server is not on the same machine as the web server, and is not answering, phpMyAdmin (starting with version 2.6.0) detects the fact and reports it, accordingly.
[edit] MySQL Said: Access Denied
This error can be solved when we understand the relevant login parameters.
[edit] When Using http Authentication
We cannot use the web server security mechanism based on a .htaccess file and the http authentication in config.inc.php together. A workaround is to use cookie as the authentication type instead of http.
[edit] When Using http, cookie, or config Authentication
The host parameter in config.inc.php must match the host defined in the user access privileges. Sometimes, a system administrator may create an account authorizing user bill and host localhost. If we try to use 127.0.0.1 host in config.inc.php, it will be rejected by MySQL, even though it points to the same machine. The same problem can occur if we try the real name of the machine (mysql.domain.com) and the definition has been made for localhost.
[edit] Access Denied ... "using password: NO"
If the message ends with using password: NO, it means that we are not transmitting a password, and MySQL is rejecting this login attempt. The password value may not have been set in config.inc.php.
[edit] Access Denied ... "using password: YES"
A password is transmitted, but the host/username/password combination has been rejected by MySQL.
[edit] Warning: Cannot Add Header Information
This problem is caused by some characters (such as blank lines or spaces) being present in config.inc.php, either before the <?php tag at the beginning, or after the ?> tag at the end. We should remove these with an editor that supports .php files.
[edit] MySQL Said: Error 127, Table Must Be Repaired
In the left panel, we click on the database name. In the right panel, we select the name of the table for which there is an error (using the relevant checkbox). We then choose Repair from the lower drop-down list. More details are available in Tutorial 10.
[edit] BLOB Column Used in Key Specification without a Key Length
MySQL requires that an index set on a BLOB column be limited in size. The simple index creation technique available when creating a column does not permit the size to be specified, so we need to create the column without an index. We then come back to the Structure page, and use the Create an index dialog to choose the BLOB column and set a size for the index.
[edit] IIS: No Input File Specified
This is a permission problem. Internet Information Server (IIS) must be able to read our scripts. As the server is running under the user IUSR_machinename, we have to do the following:
Right-click on the folder where we installed phpMyAdmin.
Choose Properties.
Click on Add under the Security tab, and select the IUSR_machinename user from the list.
Ensure that this user has read permission to the directory.
[edit] A "404: page not found" Error when Modifying a Row
This happens when the $cfg['PmaAbsoluteUri'] parameter in config.inc.php is not set properly. Tutorial 2 explains how to take care of this parameter.
[edit] Other Problems
Here, we cover solutions to problems that do not show up on screen as a specific error message.
[edit] Blank Page or Weird Characters
By default, phpMyAdmin uses output buffering and compression techniques to speed up the transmission of results to the browser. These techniques can interfere with other components of the web server, causing display troubles. We can set $cfg['OBGzip'] to FALSE in config.inc.php. This should solve the problem.
[edit] Not Being Able to Create a Database
No privileges appears next to the Create database dialog on the Home page if phpMyAdmin detects that the account used to log in does not have the permissions to create a database. This situation occurs frequently on hosted servers where the system administrator prefers to create one database for each customer.
If we are not on a hosted server, this message simply reflects the fact that we do not have the global CREATE privilege, nor any CREATE privilege on a wildcard database specification.
[edit] Problems Importing Large Files or Uploading Large BLOB Files
Usually, these problems indicate that we have hit a limit during the transfer. Tutorial 8 explains these limits and the recommended course of action. As a last resort solution, we might have to split our large text files. (Search the Internet for file splitters.)
[edit] MySQL Root Password Lost
The MySQL manual explains the general solution at http://www.mysql.com/doc/en/Resetting_permissions.html.
The solution involves stopping the MySQL server, restarting it with the special option, skip grant tables (that basically starts the server without security). The way to stop and restart the server depends on the server platform used. Then, we can connect to the server from phpMyAdmin as a superuser (like root), and any password. The next step is to change root's password. (See Tutorial 17.) Then we can stop the MySQL server and restart it using normal procedures. (Security will become active again.)
[edit] Duplicate Field Names when Creating a Table
Here is a curious symptom: when we try to create a table containing, for example, one field named FIELD1 of type VARCHAR(15), it looks like phpMyAdmin has sent a command to create two identical fields named FIELD1. The problem is not caused by phpMyAdmin, but by the environment. In this case, the Apache web server seems well configured to run PHP scripts, when in fact, it is not. However, this bug only appears for some scripts.
The problem occurs when two different (and conflicting) sets of directives are used in the Apache configuration file:
SetOutputFilter PHP SetInputFilter PHP ...and: AddType application/x-httpd-php .php
These sets of directives may be in two different Apache configuration files, so they are difficult to notice. The recommended way is to use AddType, so we just have to put comments on the other lines, as shown in the following snippet, and restart Apache:
#SetOutputFilter PHP #SetInputFilter PHP
[edit] Authentication Window Displayed More Than Once
This problem occurs when we try to start phpMyAdmin with a URL other than the one set in $cfg['PmaAbsoluteUri']. For example, a server may have more than one name, or we may be trying to use the IP address instead of the name.
[edit] Column Size Changed by phpMyAdmin
MySQL itself sometimes decides to change the column type and size, for a more efficient column definition. This happens mostly with CHAR and VARCHAR.
[edit] Seeing Many Databases that Are Not Ours
This problem occurs mostly after an upgrade to MySQL 4. The automatic server upgrade procedure gives the global privileges CREATE TEMPORARY TABLES, SHOW DATABASES, and LOCK TABLES to all users. These privileges also enable users to see the names of all the databases (but not their tables) until we upgrade the grant tables, as described in the MySQL manual. If the users do not need these privileges, we can revoke them, and they will only see the databases to which they are entitled.
[edit] Not Being Able to Store a Value Greater Than 127
This is normal if we have defined a column of type TINYINT, since 127 is the maximum value for this column type. Similar problems may arise with other numeric column types. Changing the type to INT, expands the available range of values.
[edit] Seeking Support
The starting point for support is the home page http://www.phpmyadmin.net, which has sections about documentation and support (feedback). There you will find links to the discussion forums, and to various trackers such as:
- Bugs tracker
- Feature requests tracker
- Translations tracker
- Patches tracker
- Support tracker
[edit] FAQs
The Documentation.html file, which is part of the product, contains a lengthy FAQ section with numbered questions and answers. It is recommended to peruse this FAQ section as the first source for help.
[edit] Help Forums
The development team recommends that you first use the product's forums to search for the problem encountered, and then start a new forum discussion before opening a bug report.
[edit] Creating a SourceForge Account
Creating a (free) SourceForge user account and using it for posting on forums is highly recommended. This enables better tracking of questions and answers.
[edit] Choosing the Thread Title
It is important to choose the summary title carefully when you start a new forum thread. Titles like "Help me!", "Help a newbie!", "Problem", or "phpMyAdmin error!" are difficult to deal with because answers are threaded to this title, and further reference becomes problematic. Better titles would be "Import with UploadDir", "User can't but root can login" or "Server not responding".
[edit] Reading the Answers
As people will read and almost always answer your question, giving feedback in the forum about the answers can really help the person who answered, and others who have the same problem.
[edit] Support Tracker
This is another place to ask for support. Also, if we have submitted a bug report, which is in fact a support request, the report will be moved to the support tracker. With your SourceForge user account, you will be notified of this tracker change.
[edit] Bug Tracker
In this tracker, we see bugs that have not yet been fixed, plus bugs that have been fixed for the next version. (This is to avoid getting duplicate bug reports.)
[edit] Environment Description
As developers will be trying to reproduce the problem mentioned, it helps to describe your environment. This description can be short, but should contain the following items:
- phpMyAdmin version (the team, however, expects that it is the current stable version)
- Web server name and version
- PHP version
- MySQL version
- Browser name and version
Usually, specifying the operating system on which the server or the client are running is not necessary, unless we notice that the bug pertains to only one OS. For example, FAQ 5.1 describes a problem where the user could not create a table having more than 14 fields. This happens only under Windows 98.
[edit] Bug Description
We should give a precise description of what happens (including any error message, the expected results, and the effective results we get). Reports are easily managed if they describe only one problem per bug report (unless the problems are clearly linked).
Sometimes, it might help to attach a short export file to the bug report, to help developers reproduce the problem. Screenshots are welcome.
[edit] Contributing to the Project
Since 1998, hundreds of people have contributed translations, code for new features, suggestions, and bug fixes.
[edit] The Code Base
The development team maintains an evolving code base from which they periodically issue releases. A paragraph in the home page downloads section describes how to use Subversion to get the latest version in development. (This can be also done by downloading the Subversion snapshot.) A contribution (translation update, patch, new feature) will be considered with a higher priority if it refers to the latest code base, and not to an ancient phpMyAdmin version.
[edit] Translation Updates
Taking a look at the project's current list of 54 languages, we notice that they are not equally well maintained. The details about translations are available at http://cihar.com/phpMyAdmin/translations/. We can try to join the official translator for a particular language, to propose corrections to/or translations of recently added messages. If this person does not answer, we can send our modifications to the translation tracker, inside a compressed (.zip) file.
[edit] Patches
The development team can manage patches more easily if they are submitted in the form of a context diff against the current code base, with an explanation of the problem solved or the new feature achieved. Contributors are officially credited in Documentation.html.
[edit] Future phpMyAdmin Versions
Here are the points that the development team is considering for the next versions:
- Improved support of MySQL's new features
- User preferences in permanent storage
- Internal code improvements
In particular, version 3 will most likely support these minimum versions: PHP 5.2 and MySQL 5. Also, this version will remove the support of non-UTF-8 language files.
[edit] Summary
In this tutorial, we saw how to prevent problems with a properly configured server, and where to ask for help. We also explained some common errors and suggested solutions. Moreover, the Contributing to the Project section explained how to help in order to improve phpMyAdmin.
[edit] Additional References
- For instructions on Installing phpMyAdmin, click here
[edit] Source
The source of this content is Chapter 20: Troubleshooting and Support of Mastering phpMyAdmin 2.11 for Effective MySQL Management by Marc Delisle (Packt Publishing, 2008).

