How to Troubleshoot Common Database Errors
This article discusses some of the common errors you may encounter when working with databases in phpMyAdmin.
For instructions on accessing phpMyAdmin, please visit this article: How To Access phpMyAdmin from cPanel. Now that you know how-to access your phpMyAdmin, let's go over the list of the common database errors and their "how-to" fixes. So, here we go!
Please click the links below for more information.
- "Table is full" error ↴
- "Tables missing" error ↴
- Error 2002 ↴
- Error code 1064↴
- Error code 2013 ↴
- Error: Packet too large ↴
- MySQL can't create/write to file ↴
- phpMyAdmin is showing a login screen ↴
"Table is full" error
1114 (HY000) at line 1234:: The table "abc" is full.
There are many reasons why this error code is showing: the database itself is full and full disk and database server settings.
To resolve this issue, you may try to:
- Fix disk issues
- Fix SQL server settings
- Recreate indexes
"Tables missing" error
Databases manually created via the MySQL Databases section of the cPanel are empty. They are created without tables. You may encounter this error code when executing a search query in your database.
Tables missing. No tables found in the database!
Please make sure that the target database does have tables.
- If you are attempting to import information into a database, please follow the instructions in this article:
If the database does have tables in it but is not visible, refresh the screen. You can also click the Structure tab of your selected database, then click Browse under the Action column.
When you access your phpMyAdmin, you may encounter an error similar below:
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
Error code 1064
Error Code 1064 (42000): You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near _____
This error occurs when the query's syntax is not set correctly. The common mistakes are due to the quotation marks and backticks used.
Please check out your query syntax for double quotes, single quotes, or backticks to fix this.
Error code 2013
Error Code 2013: Lost connection to MySQL server during query
This error shows up when the connection between the MySQL client and database server times out. The connection got lost because the query took too long to return the requested data.
To resolve this, you may want to try changing the 'timeout' values on the server. You may also try rewriting your SQL queries.
Error: Packet too large
ERROR: Packet too large
This error is most often coupled with Error Code 2013: Lost Connection to MySQL server during query and is caused by a query attempting to send bytes exceeding that set for a communication packet.
For this, it is recommended that the variable max_allowed_packet be increased to a value as big as the largest blob field used.
MySQL can't create/write to file
mysql can't create/write to file
This error code shows up when MySQL cannot create a temp file for the result set in the temp directory.
For this, you may want to fix the permission issues of the tmpdir directory. Please check if that directory exists or if the file system is already full.
phpMyAdmin is showing a login screen
If clicking on the phpMyAdmin button in your cPanel brings you to a login page for phpMyAdmin, this means that your MySQL and cPanel passwords are not synced. You can resolve this yourself by simply changing your cPanel password.
These are just among the few examples of error codes you may encounter when working with databases. Learning more about error codes may seem overwhelming at first; however, documentation about their resolutions is available online. You may check out this support article:
Want to know more about databases and phpMyAdmin? You may want to start with these articles: