|
Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews. |
Advertisement | |
This is an HTML example. Isn't it just wonderful?!?!
|
|
Learn how to remove ads |
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
I'm back once again with the same issue, I never got it fixed from last time.
If I install gars in a beta envoirment, then backup the database, create a new forum and attempt to install the backed up database, I get the same error: ERROR 1064 at line 1247: 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 'default smallint(6) NOT NULL default '0', allowhtml tinyint(4) I'm at a loss as to how to address this issue. I have no experience in multiping the database. Your assistance would be great appericated. |
#12
|
||||
|
||||
Can you post the section of the sql in question?
Its most likely an unqualified column name. i.e. mod or order instead of `mod` or `order` HTHs |
#13
|
|||
|
|||
I'm not sure what you mean by the section of the sql in question. I posted the error I receive using putty via ssh, here is the error I receive when attempting to restore the database to a empty database:
ERROR 1064 at line 1247: 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 'default smallint(6) NOT NULL default '0', allowhtml tinyint(4 I know if I uninstall gars and do a mysqldump, then upload the dumped mysql dump I have no problems. I only experience problems if I have gars installed when I do the dump. |
#14
|
||||
|
||||
Can you not open up the dump and paste the code around line 1247?
|
#15
|
|||
|
|||
I can not open the entire database in notetab++ it's just to big even with 2gigs of ram so here is the code for the gars table where the restore stalls.
Code:
-- -- Table structure for table `gars` -- DROP TABLE IF EXISTS gars; CREATE TABLE gars ( threadid int(11) NOT NULL default '0', byline varchar(150) NOT NULL default '', userid int(11) NOT NULL default '0', pagecount int(11) NOT NULL default '1', header_image varchar(255) NOT NULL default '', synopsis mediumtext, data mediumtext NOT NULL, feature_untill int(11) NOT NULL default '0', ratings_data mediumtext, avg_rating_data mediumtext, overall_rating smallint(6) NOT NULL default '0', avg_rating smallint(6) NOT NULL default '0', custom1 mediumtext NOT NULL, custom2 int(11) NOT NULL default '0', rating_count int(11) default '0', PRIMARY KEY (threadid) ) TYPE=MyISAM; -- -- Dumping data for table `gars` -- /*!40000 ALTER TABLE gars DISABLE KEYS */; LOCK TABLES gars WRITE; INSERT INTO gars VALUES (62650,'',36,1,'',NULL,'',0,NULL,NULL,0,0,'',0,0),(57582,'',591,1,'',NULL,'',0,NULL,NULL,0,0,'',0,0); UNLOCK TABLES; /*!40000 ALTER TABLE gars ENABLE KEYS */; Thank you in advance for your time. |
#16
|
||||
|
||||
wow. That is big. Sorry for the pain. Export all tables except for gars, then export the gars ones and you should be fine. Then surround column names with ` as in `rating_count` and you should be fine. Im suprised that export utilities dont do this automatically
|
#17
|
|||
|
|||
I'm using mysqldump --opt -u(username) -p(password) database name >/home/virtual/site/fst/var/www/html/backup/databasename.sql
The current database is 497 megs in size. I've never done an individual export of tables before as there are 150+ tables in the database. Is it possible to repair what might be wrong with the current database so I can make reliable backups? |
#18
|
||||
|
||||
OK, been search constantly for this and I think I have the solution. Export with the option: --quote-names
This should fully qualify table and column names for you. Please let me know if this helps! |
#19
|
|||
|
|||
quick question on the syntax. How do I configure the syntax? I have to use --opt to bypass memory.
Do I just add --opt quote-names? I appericate the effort you've put into this issue. |
#20
|
||||
|
||||
Can you try:
mysqldump --opt -u(username) -p(password) --quote-names database name >/home/virtual/site/fst/var/www/html/backup/databasename.sql Im not exactly sure on the command line syntax as ive never really used it - however the above should be fine |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MySQL error every day | Hengis | Geek Advertising Banner System | 8 | 12-09-2009 06:21 PM |
Getting mysql error | truCido | Geek Advertising Banner System | 6 | 08-11-2008 08:27 AM |
Mysql error after reinstall? | CAMS | GeekMart | 11 | 07-03-2006 01:10 AM |
Products - Items MySQL Error... | DerTobi75 | GeekMart | 21 | 12-07-2005 12:20 PM |
[fixed][3.0.8] - Vendor mysql db error | GoTTi | GeekMart | 4 | 08-23-2005 09:53 PM |