BrainHappy BrainHappy - 1 year ago 73
MySQL Question

Importing SQL Query server-side error

I receive this error when I try to upload my SQL data in my new server:

SQL query:

-- Database: `dacwp0_brainhappy_ca`
`dacwp0_brainhappy_ca` ;

MySQL said: Documentation
#1064 - 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 '`dacwp0_brainhappy_ca`' at line 4

The beginning of my imported .sql file

-- phpMyAdmin SQL Dump
-- version v0.1-int.sec.
-- Host: shiku
-- Generation Time: Sep 22, 2016 at 10:48 PM
-- Server version: 5.1.66
-- PHP Version: 5.3.29


-- Database: `dacwp0_brainhappy_ca`

I'm seriously at a loss of what to do. Any mySQL gurus on here?

Answer Source

I think you meant to use the said database and in that case you are missing the use keyword before database name to use the stated database. It should be

use `dacwp0_brainhappy_ca`;

See MySQL Documentation On USE Syntax for more information

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download