MyBB Community Forums

Full Version: Import backup.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am not sure if I posted in the right section, but here we go.

I am trying to import a backup, because I managed to brake my VPS and had to reinstall it.
Whenever I am importing my backup into phpmyadmin I receive the following error :

#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 '?' at line 1

My question is, how do I check the "manual" and.... what the hell "for the right syntax to use near '?' at line 1"...
I suck lime when its comes to managing and working in phpmyadmin with database's, neither I am the most advanced person in understanding these things, but I am willing to learn and this is a great opportunity.

Bump.
can you post few lines from the beginning of your database backup sql file ..
which MySql version you have ? (shown at the home page of forum admin panel)
MySQLi 5.5.47

-- MyBB Database Backup
-- Generated: 18th May 2016 at 21:45
-- -------------------------------------

CREATE TABLE columns_priv (
Host char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
Db char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
User char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
Table_name char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
Column_name char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
Column_priv set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (Host,Db,User,Table_name,Column_name)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
CREATE TABLE db (
Do you have SSH access? If so, try importing with commandline.
Yes I do.
Can you try import the SQL file with commandline?

mysql -u username -p db_name < /path/to/database.sql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Are you able to log in?
mysql -u username -p
(2016-05-19, 07:18 PM)nth Wrote: [ -> ]Are you able to log in?
mysql -u username -p

Yes, I just logged in successfully.

[Image: Z0onCVi.png]
USE database_name;
SOURCE filename.sql
Pages: 1 2