Hello,

I am a graphic designer who does some web design on the side.
The store I work at had a website that the boss wanted transferred
to a different host. So I downloaded it off the server and uploaded it
onto a new one. I knew that I was going to have problems once it was
uploaded because the site relies on heavily SQL and I honestly have no experience
in databases. I know it sounds foolish of me to take on something like this
with no previous experience, but I think, with some help, I can pull it off.
So basically the problem I am having is that everytime I try to load a page
from the site, it says 'Could not connect to SQL db'. I've transferred the database
to the new server as well and am not really sure what my next plan of attack
should be? Any suggestions, tips, advice, etc. would be very appreciated.

Thanks,

iamlevicious

Recommended Answers

All 10 Replies

Is the SQL db the same, e.g. both mysql ? Can you use the same user, with the same password ? Is the PHP version the same, as of version 5, mysql extension is not automatically activated. Are you using other specific extension that are not yet installed ?

1 - Yes, both servers are using MySQL, I made sure of that before I transferred the site
2 - I can't use the same name and password because the hosting I am using automatically assigns a username and password for the database
3 - I am not sure what version of PHP is being used. How would I go about finding out?
4 - I don't believe I am using any specific uninstalled extensions.

Thanks

OK, so I found out that both servers are using PHP ver. 5.
Is this going to be a case of me just having to go into the files
and changing the username, password, host, etc.?
Also, I've been reading up and it sounds like using an SSH is much easier
than phpMyAdmin. The host i was using before uses a pretty old version of phpMyAdmin (2.22)
and my new host isn't. How would I go about getting access to a shell command instead of phpMyAdmin?

Thanks,

iamLeVicious

In config files used by your php files somewhere the user and pass is defined. This depends on your software, can't tell you where it is.

SSH access depends on your provider. Some have it, some allow it in special occasions and some don't allow it at all. Ask your host. If you can have remote access to your mysql then tools like navicat (my personal favorite, not free) or toad or the mysql toolbox (both free) can help you without the need for SSH.

I am beginning to suspect that perhaps I may have transferred the db
incorrectly. As I said, my previous host is using a pretty old version of
phpMyAdmin, while the new one is using a fairly recent one. With the old
version, there is no export option so I ended up, somehow, finding a way to save
it as a text file. I emailed my previous host and they offered to "zip it up".
I assume this means they are going to archive it for me via a zip file.
I was so naive to think that transferring a whole website from one host to
another would be a cakewalk. On another note, I think I found the config file
you were talking about buried in a phpMyAdmin folder on the website. Does that
sound like a likely place for such a file?

Thank you for your patience,

iamLeVicious

phpmyadmin indeed has a config file where you can set user/password. it is supposed to be in the phpmyadmin folder.

A couple posts above you talked about remote access to the database. Is this something that anyone can have or is it something only people with access to SSH have? I've tried multiple tools such as Dreamcoder for MySQL and the MySQL Migration Toolkit, but I can never establish a connection. Either I am just not allowed to have access to the db other than phpMyAdmin or the information my host has given me is incorrect.

If you have for example CPanel access to your account, than you can enable remote mysql access from there.

Where would I go if, say, I decided that this was all a little over my head and I wanted to maybe have someone who knows what theyre doing complete the website transfer?

Well, in my opinion hire/find someone who can show you what went wrong, so someone you can sit down with.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.