Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 04-28-2009 01:07:14

ellehazen
Member
Registered: 03-14-2006
Posts: 129

Server Migration - MySQL run errors

I ran out of space on my server which caused my site to freeze with a minor edit, and I had to migrate my "shared server" onto the newer "grid server" in order to get more space. Because this all happened suddenly I didnt get to research it and was certainly unprepared.

Once migrated, I changed the server_script_paths and such in the .CGI files. But now I am getting run errors regarding MySQL and I cant find any pieces of code to update. Where it currently says "localhost", it needs to be changed to the new Internal Hostname: internal-db.s66618.gridserver.com

I cannot locate where to change this. Here is the error:
Script Execution Error

The following error was just encountered:

DBI connect('host=localhost;database=roversallover_com_-_store','roversallover',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /home/66618/domains/roversallover.com/cgi-bin/store/library/common/database.pl line 232

------------------------------

[I have read through the aforementioned "database.pl" file and dont see an appropriate place to input this.]

Where can i change the internal hostname? Are my database files at risk?

Offline

 

#2 04-28-2009 07:52:28

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Server Migration - MySQL run errors

The localhost setting can be changed by editing the altrdbms.csv table, located in the data/tables directory, assuming the username and password have stayed the same.  The username can also be changed there in the same way, but the password is encrypted, so if the password needs to be changed, search the forum for the procedure to reset the password (I know it's posted here somewhere).


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#3 05-12-2009 22:01:36

ellehazen
Member
Registered: 03-14-2006
Posts: 129

Re: Server Migration - MySQL run errors

I changed it (only for "MYSQL_host"). Now I'm getting this:

Script Execution Error

The following error was just encountered:

DBD::AnyData::st fetchall_arrayref failed: Attempt to fetch row from a Non-SELECT statement at /home/66618/domains/roversallover.com/cgi-bin/store/library/common/database.pl line 295.

Offline

 

#4 05-13-2009 09:25:00

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Server Migration - MySQL run errors

Sounds like the table got horked in your modification attempt... maybe used the wrong mode (binary vs. ascii) to FTP the file.  Better revert to your backup and start again.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#5 05-13-2009 09:27:16

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Server Migration - MySQL run errors

P.S. - Tables (CSV files) must be transferred in BINARY mode.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#6 05-13-2009 14:09:27

ellehazen
Member
Registered: 03-14-2006
Posts: 129

Re: Server Migration - MySQL run errors

Re-did it just to make sure it was in binary, and i'm still getting the same error??

Offline

 

#7 05-13-2009 22:48:57

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Server Migration - MySQL run errors

If it's already been messed up, re-downloading and re-uploading it won't fix it.  Do you have a backup copy on the server that you haven't edited?  The other possibility is that you have damaged the row structure by inserting an extra comma or omitting a comma that should be there.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#8 05-13-2009 23:33:01

ellehazen
Member
Registered: 03-14-2006
Posts: 129

Re: Server Migration - MySQL run errors

yes, when i did it again, i re-downloaded the original back-up to edit and uploaded in binary. so it definitely doesn't make any sense to me.  I ran across another post about moving servers and it said that all the files should be switched to CSV files in the admin database panel. Because I had to move suddenly due to a space issue, I had some things on MYSQL and some still in CSV. Is that bad? Could it all be corrupted?

Offline

 

#9 05-14-2009 07:04:29

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Server Migration - MySQL run errors

If you copied the entire MySQL database and all the CSV files when you moved, it should be ok - it is certainly possible to move a site that way if it is done correctly.  It is possible that the new MySQL database was not set up correctly though, depending on how the DB was copied.  If you have access to the site error logs on the server, that's where I'd start.  Also, do a 'view source' on the error page - I don't recall offhand if an error in that location will print the SQL statement as a comment in the page source; but if it does, that might give us a clue.  Hopefully one of those two places will at least reveal which table has the problem and we can then check the table configuration and try to find out what is going on.  The new error you are getting probably indicates that it is connecting to the DB now, but having a problem with the columns in the table, so perhaps your change did work ok and the problem lies elsewhere.  Let's see what additional information we can gather and then go from there.  If you find an error in the site error log or a copy of the SQL statement in the page source, please post that here and I'll see if I can make any sense of it.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#10 05-14-2009 12:25:51

ellehazen
Member
Registered: 03-14-2006
Posts: 129

Re: Server Migration - MySQL run errors

When I view source it says the same thing.

I just went into my CGI-bin and see the following files that sound relevant: (?)
-CGI files (before migration)
-modules_DBI (folder)
  >DBI.pm (folder)
  >DBD.pm (folder)
  >DBI.pm (plain text)

Should i look in any of these?

Offline

 

#11 05-14-2009 12:29:23

ellehazen
Member
Registered: 03-14-2006
Posts: 129

Re: Server Migration - MySQL run errors

The server system I use migrated everything for me so I did not need to copy stuff over. I assume they did it right because the other site (not a store) is fine.

All I see are access logs which seem to have no additional info, and nothing regarding errors. Not sure how to view error logs.

I cant even access the CPC admin file

Offline

 

#12 05-14-2009 15:14:25

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Server Migration - MySQL run errors

It is very unlikely that any of the modules you listed is actually the cause of the problem.  Those are just the ones being accessed at the time, so they are really the symptom and not the problem.  Please ask your host how to view the site error logs so we can see if there is any additional information there.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#13 06-06-2009 18:26:17

vbsaltydog
Member
From: Florida
Registered: 05-02-2005
Posts: 947
Website

Re: Server Migration - MySQL run errors

Michelle,

I answered your email request for help a while back but never heard back from you. Do you still have access to the original server/files?

-Stephen


Latest CCP 7 XMods Available:


Offline

 

#14 06-10-2009 10:01:06

ellehazen
Member
Registered: 03-14-2006
Posts: 129

Re: Server Migration - MySQL run errors

Hey Stephen...

I'm not sure if I have access? How would i know?

Offline

 

#15 06-10-2009 10:42:21

vbsaltydog
Member
From: Florida
Registered: 05-02-2005
Posts: 947
Website

Re: Server Migration - MySQL run errors

It would be easier if you called.


Latest CCP 7 XMods Available:


Offline

 

Board footer