Database Error CorrectionsLast Update: 6th September, 2005
Article ID: 69



Introduction

Some common errors and faq's are listed below describing a certain database error that might be encountered and a solution to that error.

1016 - Can't open file

The following error message is shown when a database table is corrupt and can no longer be accessed nor read properly:

1016 - Can't open file '<database table name>.MYI' (errno: 145)

The error message will always be shown until the database table involved has been repaired.



1030 - Got error 127 from table handler

This indicates the table mentioned is corrupt.



1046 - No Database Selected

This indicates that either no database has been created or the wrong database name DB_DATABASE exists in the configure.php files.

select configuration_key as cfgKey, configuration_value as cfgValue from configuration




Warning: mysql_connect(): Access denied for user:

The following error message is shown when either the username or password is incorrect for the database connection:

Warning: mysql_connect(): Access denied for user: 'username@localhost' (Using password: YES) in /home/username/public_html/shop/includes/functions/database.php on line 19
Unable to connect to database server!




Warning: mysql_connect(): Can't connect to local MySQL server through socket

The error Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket filename or TCP/IP port number when trying to connect to the server.

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
in /var/www/html/store/catalog/includes/functions/database.php on line 19
Unable to connect to database server!




Warning: mysql_connect(): Host '******' is not allowed

This indicates the wrong server DB_SERVER information in the configure.php files.

Warning: mysql_connect(): Host '******' is not allowed to connect to this MySQL server in *:\******\www\*****\******\includes\functions\database.php on line 19
Unable to connect to database server!




Warning: Too many connections

The following error message is shown when the maximum number of connections to the database server has been reached:

Warning: Too many connections in /path/to/osCommerce/includes/functions/database.php on line 19 Warning: MySQL Connection Failed: Too many connections in /path/to/osCommerce/includes/functions/database.php on line 19. Unable to connect to database server!


 

 

Trademark Policy | Copyright Policy | Sitemap

Copyright © 2000-2005 osCommerce. All rights reserved.