HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

mySQL Help

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#26956 (In Topic #6220)
Joe
Avatar

Honoured member

I recently switched hosts due the numerous problems I was having while with my old host. I am trying to import my tables into the new host, but I get errors while importing. One of my problems is that phpMyAdmin denys the import of IP addresses. Any statement that includes an IP, phpMyAdmin gives me an error.

Code

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Invalid Identifer @ 143
STR: 72.230.
SQL:

--
-- Dumping data for table `ocportal2_adminlogs`
--

INSERT INTO `ocportal2_adminlogs` VALUES (1, 'ADD_THEME', 'TS2S_Designs', NULL, 2, 72.230.46.122, 1160201382);


SQL query:

-- -- Dumping data for table `ocportal2_adminlogs` -- INSERT INTO `ocportal2_adminlogs` VALUES (1, 'ADD_THEME', 'TS2S_Designs', NULL, 2, 72.230.46.122, 1160201382);

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 '.46.122, 1160201382)' at line 1

I'm not very experienced with mySQL, so any suggestions to help eliminate the error would be very appreciated. Thank you.

-Joe

Back to the top
 
Posted
Rating:
#26966
Avatar

ocStaff (admin)

Your SQL dump exported wrongly somehow…

Code

INSERT INTO `ocportal2_adminlogs` VALUES (1, 'ADD_THEME', 'TS2S_Designs', NULL, 2, 72.230.46.122, 1160201382);
should have been…

Code

INSERT INTO `ocportal2_adminlogs` VALUES (1, 'ADD_THEME', 'TS2S_Designs', NULL, 2, '72.230.46.122', 1160201382);

(Note the single quotes around the IP address.)



Become a fan of ocPortal on Facebook or add me as a friend.

Expand: Was I helpful? Was I helpful?

Expand: Follow me on Twitter Follow me on Twitter







If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
Back to the top
 
Posted
Rating:
#26988
Avatar

Hallowed customer

I also found a good tool to use to import the who database.

Most hosts only let you add so much at a time with PHPmyadmin.

This tool worked for me if you want to read about it.

(disclaimer)
I did not make this tool, nor do I know who made it. I did use it to upload my database so that I did not have to cut it up.

Here is the information…

// BigDump ver. 0.24b from 2006-06-25
// Staggered import of an large MySQL Dump (like phpMyAdmin 2.x Dump)
// Even through the webservers with hard runtime limit and those in safe mode
// Works fine with Internet Explorer 6.0, Firefox 1.x and even Netscape 4.8

// Author:       Alexey Ozerov (alexey at ozerov dot de)
// Copyright:    GPL (C) 2003-2006
// More Infos:   http://www.ozerov.de/bigdump

// This program is free software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the Free Software Foundation;
// either version 2 of the License, or (at your option) any later version.

Back to the top
 
Posted
Rating:
#26992
Joe
Avatar

Honoured member

So what you're saying is, I have to go through the entire SQL file and edit it so every IP address is surrounded by single quotes?

Back to the top
 
Posted
Rating:
#26993
Joe
Avatar

Honoured member

Nevermind, I'll just start from scratch. I tried to edit the SQL file, but my source code editor and my computer both freeze when I try to search for something in the file. The entire file is all screwed up because now I'm getting errors about the EN statements.

Back to the top
 
Posted
Rating:
#27022
Joe
Avatar

Honoured member

Ok, I've taken a few days to edit the database information. I almost successfully edited the entire SQL file, except for a few rows.

The ocp2_cache table has quite a few insert statements that are very long. That being said, everytime I try to scroll to the end of a statement, my source code editor keeps freezing up.

I must ask; what code editor was used to write these statements, Chris? Maybe the code editor you've used could help me edit the coding without freezing.

Back to the top
 
Posted
Rating:
#27023
Avatar

ocStaff (admin)

None of the SQL was written manually. ocPortal code generates it automatically from separately defined data structures.

You may safely remove all the cache rows from your SQL dump as seeing as it's only cacheing data, it'll get regenerated.



Become a fan of ocPortal on Facebook or add me as a friend.

Expand: Was I helpful? Was I helpful?

Expand: Follow me on Twitter Follow me on Twitter







If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
Back to the top
 
Posted
Rating:
#27024
Joe
Avatar

Honoured member

Ok, one more question. None of my custom Comcode pages were transferred for some reason. What is the table where these pages are stored? I may have missed a table.

Back to the top
 
Posted
Rating:
#27025
Avatar

ocStaff (admin)

Custom Comcode pages are stored as text files in the /pages/comcode_custom/EN/ directory for each zone. Just copy-and-paste them in your FTP manager to transfer them. :)

Back to the top
 
Posted
Rating:
#27026
Joe
Avatar

Honoured member

Oh ok. Thank you for the tip. ;)

Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: