migration: error 1064 problem and possible fix - Joomla! Forum - community, help and support


i case experiences same problem:

i migrating joomla new server , kept getting error:

error 1064 (42000) @ line 139: have error in sql syntax;
check the
manual corresponds mysql server version right
syntax use
near 'option varchar(50) not null default '0',
ordering int(11) not null default '0' @ line 9

i have not modified or created joomla tables must amiss joomla or extension have added.

on reading various mysql forums , forums here realised quoting problem , needed mysql put quotes round table names.

i use mysqldump export whole database , data, command make add quotes is:

mysqldump --add-drop-table -qu root -pmypassword mydatabase > mydatabase.sql

the 'q' trick making add quotes table names. in case root user.

btw security better not put password on command line in unix better use:

mysqldump --add-drop-table -qu root -p mydatabase > mydatabase.sql
then type password @ prompt appear if use -p on own.

create database

#log mysql

#create database
create database  mydatabase;

#grant permissions
grant on mydatabase.* myuser@localhost identified "mycleverpassword"

#exit mysql


#import data

mysql -u myuser -p mydatabase< mydatabase.sql

hope works out there...  :)

cheers,

william






Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'