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

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


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

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. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#26988
Avatar

Community saint

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

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. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
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

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
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: