Title: WordPress database error
Last modified: August 18, 2016

---

# WordPress database error

 *  [senlow](https://wordpress.org/support/users/senlow/)
 * (@senlow)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-1/)
 * Has anyone seen this before?
 * WordPress database error: [You have an error in your SQL syntax near ‘; ‘ at 
   line 9]
    CREATE TABLE `wp_stats` (`id` int(11) unsigned NOT NULL auto_increment,`
   username` varchar(100) NOT NULL default ”,`ip` varchar(15) NOT NULL default ‘
   127.0.0.1’, `time` datetime NOT NULL default ‘0000-00-00 00:00:00’,`referrer`
   varchar(255) default NULL, `keyword` varchar(255) default NULL,`location` varchar(
   100) NOT NULL default ”, `url` varchar(100) NOT NULL default ”,`page` int(11)
   unsigned NOT NULL default ‘0’, `version` double default ‘0’,`browser` varchar(
   255) NOT NULL default ”, `referrercomplete` text NOT NULL,`country` varchar(100)
   NOT NULL default ”, `OS` varchar(255) NOT NULL default ‘Unknown’, PRIMARY KEY(`
   id`) ) TYPE=MyISAM;
 * I’m running WP 1.5, [http://saeblog.com](http://saeblog.com)
    I change the theme
   I was using and that’s when I got the error message. Anyone know what I broke?
   Thanks, Steve

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [senlow](https://wordpress.org/support/users/senlow/)
 * (@senlow)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-1/#post-165722)
 * I found some more info on this:
    In the file wp_db.php h1>Error establishing 
   a database connection</h1> This either means that the username and password information
   in your `wp-config.php` file is incorrect or we can’t contact the database server
   at `$dbhost`.
    - Are you sure you have the correct username and password?
    - Are you sure that you have typed the correct hostname?
    - Are you sure that the database server is running?
    - I checked my wp_config.php file and the db name, username and password are
      correct. The db server is running, I can go into my sql and check it.
       I’m
      stumped. Thanks, Steve
 *  [NuclearMoose](https://wordpress.org/support/users/nuclearmoose/)
 * (@nuclearmoose)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-1/#post-165724)
 * Have you recently install a plugin? If so, try deactivating it and see what happens.
 *  Thread Starter [senlow](https://wordpress.org/support/users/senlow/)
 * (@senlow)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-1/#post-165726)
 * Hi Nuclear Moose,
 * It was a plugin. wp-advanced-stats. Too bad it didn’t work, looks like a good
   plugin for tracking site info.
    Thanks for your help, Steve

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress database error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [senlow](https://wordpress.org/support/users/senlow/)
 * Last activity: [21 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-1/#post-165726)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
