Title: MYSQL Database Error
Last modified: August 18, 2016

---

# MYSQL Database Error

 *  [sleeper](https://wordpress.org/support/users/sleeper/)
 * (@sleeper)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/)
 * Well. I am trying to upload wordpress (and did). But when I go to “wp-admin/install.
   php” it says this:
 * Parse error: parse error, unexpected $ in /home/theart/public_html/blog/wp-includes/
   wp-db.php on line 306
 * So I think itÂ´s a mysql database error..?! I have created a new database but
   nothing else. No tables etc. I remember with my old domain I had to create 1 
   table for it all to work so I tried that now.. but didnÂ´t work.

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

 *  [schestowitz](https://wordpress.org/support/users/schestowitz/)
 * (@schestowitz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299934)
 * Is the database on localhost? Have you pointed WP to the correct database? It
   is unlikely that /home/theart/public_html/blog/wp-includes/wp-db.php is structurally
   corrupt and the error suggest. I believe that the error spewed out is deceiving
   and something more fundamental is involved. Have you prepended the database name
   and username with your username on the system?
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299936)
 * Delete all the files in /wp-includes, then reupload.
    Do not overwrite – this
   is usually an ftp error and easily fixed 🙂
 *  Thread Starter [sleeper](https://wordpress.org/support/users/sleeper/)
 * (@sleeper)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299948)
 * Yes the database is on localhost. And the database I created was theart_wordpress
   and I also pointed WP to the correct db so that shouldnÂ´t be the problem. Also
   the username&password are correct.
 * Is there something I should do at “phpMyAdmin”? (* You can use phpMyAdmin to 
   administrate your MySQL databases in a web based environment.*). But shouldnÂ
   ´t WP create the tables automatically so I wouldnÂ´t have to do that.
 * Tried that “delete /wp-includes” thing. DidnÂ´t work.
 * In my “create MYSQL database” place it gives “connection strings”:
    $dbh=mysql_connect(“
   localhost”, “theart_”, “<PASSWORD HERE>”) or die (‘I cannot connect to the database
   because: ‘ . mysql_error()); mysql_select_db (“theart_wordpress”);
 * So basically at wp-config.php I wrote
 * define(‘DB_NAME’, ‘theart_wordpress’);
    define(‘DB_USER’, ‘theart_’); define(‘
   DB_PASSWORD’, ‘thepasswordihave’); define(‘DB_HOST’, ‘localhost’);
 *  [schestowitz](https://wordpress.org/support/users/schestowitz/)
 * (@schestowitz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299950)
 * Using MyAdmin will not get you anywhere and you can only intervene (break) the
   integrity of a WordPress-type schema.
 * Try installation from scratch for ‘proof of concept’. Fresh filebase, fresh database,
   re-use nothing. Server (e.g. software versions, conflicts) will be ruled out 
   as a a culprit this way. WP should be fine, which would suggest bad settings.
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299951)
 * It’s not a database thing – it’s happening because a file has been corrupted 
   during the upload.
    Did you delete and reupload /wp-admin ?
 *  [schestowitz](https://wordpress.org/support/users/schestowitz/)
 * (@schestowitz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299952)
 * You wrote: define(‘DB_USER’, ‘theart_’);
 * What’s your username again? It can’t be void, can it? Unless you hide it of course.
 *  Thread Starter [sleeper](https://wordpress.org/support/users/sleeper/)
 * (@sleeper)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299955)
 * my username for the database is theart_ and I gave that username ALL ACCESS.
 * Yes also deleted/reuploaded wp-admin. DidnÂ´t work.
 * I guess I just have to delete everything and start again. Hopefully itÂ´ll work
   this time… but I still have a feeling it has got something to do with database
   not connecting.. like I should create a table first or something (thatÂ´s what
   I had to do @ my last domain..and then wp worked). But that didnÂ´t work this
   time.
 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299959)
 * The error you received:
    `Parse error: parse error, unexpected $ in /home/theart/
   public_html/blog/wp-includes/wp-db.php on line 306` is a PHP parse error, which
   has nothing to do with the database. This is PHP saying “Hey, I found a dollar
   sign and I wasn’t expecting one”.
 * That usually means you need to re-upload the PHP files to your server, taking
   care to use ASCII mode for any FTP transfers.
 *  Thread Starter [sleeper](https://wordpress.org/support/users/sleeper/)
 * (@sleeper)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-299973)
 * Ah okay. Thank you :)! IÂ´ll try again…and again ^^!
 *  Thread Starter [sleeper](https://wordpress.org/support/users/sleeper/)
 * (@sleeper)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-300012)
 * Now I did try to upload everything again etc. It still says “parse error”. Same
   thing with phpBB-forum that I tried to upload.
 * I havenÂ´t altered any files. (except the password/username path stuff that I
   was supposed to alter). So why does it give me “parse error”. The .php files 
   should be correct since.. they work on others.
 * Could it be my FTP uploading program? Or the fact that my domain became active
   just today?
 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-300013)
 * The fact that your domain became active today has nothing to do with this.
 * What FTP program are you using? It might be worthwhile to try an alternate program.
   You are taking care to upload in ASCII mode, right?
 *  Thread Starter [sleeper](https://wordpress.org/support/users/sleeper/)
 * (@sleeper)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-300014)
 * I am using FreeFTP which IÂ´ve used before in my old domain and it worked fine.
 * With FreeFTP you can upload files in ASCII, Binary or “auto” mode. I usually 
   use the auto mode because it does really work and seperate the ASCII and Binary
   files and upload them in correct way. ..or did work. In my old domain. Maybe 
   not in the current one.

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

The topic ‘MYSQL Database Error’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [installation](https://wordpress.org/support/topic-tag/installation/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 12 replies
 * 4 participants
 * Last reply from: [sleeper](https://wordpress.org/support/users/sleeper/)
 * Last activity: [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-database-error-1/#post-300014)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
