Help with some PHP/MySQL stuff

IDSkoT
5,000+ posts

Resonating Reticular
Alright, well... if I don't do this i lose my job. So, I'd appreciate if someone could help me on this one...

My Boss had this website on this bo-bo website, and wanted to switch to a more reputable website. We chose GoDaddy.com, and honestly, it's only put me up to a lot of problems, more than normally. I can normally do a server change in less than 24 hours... but it's been like 5 days =|

Anyway, I finally got the domain and DNS all set-up.

Now I'm having a problem.

My question:

Do I just copy all the files from Server A [original server] to Server B [new server]?

Do I have to set-up a MySQL database?

If so... how do I do it?!

BTW, I'm getting this at this point [when I load index.php]:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/i/m/d/imdrjegg/html/includes/config.php on line 10

Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/i/m/d/imdrjegg/html/includes/config.php on line 11

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/content/i/m/d/imdrjegg/html/includes/config.php on line 11

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/i/m/d/imdrjegg/html/index.php on line 11

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/content/i/m/d/imdrjegg/html/index.php on line 11

Invalid query: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2)
 
Reply for bump +

There were 6 main folders on the server, one had all the code in which the web site ran off of... I only uploaded that folder. Is that what might be wrong?

 
Well, I have little to no experience with servers, but I did just finish a 4 week class on php/mysql.
What software package are you using, we used XAMPP and it workd great.

Honestly not sure...

I don't think I was able to choose.

I just got a web server on GoDaddy with Linux and Php 5.0, that's all I know.

 
well if i was you I would download xampp and use the phpmyadmin tool to manage the database, its free and very nice software package. You can run your local computer as the server, get everything working then FTP it to the actual server

 
well if i was you I would download xampp and use the phpmyadmin tool to manage the database, its free and very nice software package. You can run your local computer as the server, get everything working then FTP it to the actual server

I'll check it out: but there's a problem.

I don't know what's wrong.

Like I said previously, could there be some of the MySQL in the other folders?

 
Do this (as long as you have SSH access on both servers)

scp -P 22 username@oldserverIP:/home/content/* /home this will copy all of the old files on your old server to the /home directory on your new server where you can do a cp of the files to the domains folder you setup via your control panel.

For mySQL go into phpmyadmin select your database(s) from the left hand side then click on the export tab up top, when all of your tables should be highlighted blue and SQL should be set as the export type automatically. Click on 'Save as file' at the bottom then hit go, this will download your mysql database to your PC.

You can then create the new database on your new server upload the database via ftp and run mysql -urooot -p newDBname

This does not even get into your emails or any other shit but should get your site moved.

As for godaddy they ****, I would drop them and find a real provider with a good control panel such as cPanel. If your current (old) host is using cPanel or even Ensim control panel you can do a backup from that control panel and then just restore on your new server which will be the easiest way.

Godaddy is the sony xplode of web hosts, I would not advise against them for a cheap solution to host noods of your ex or some shit you do not consider mission critical such as family photos but would not use them for business use. I see MANY people switch away from godaddy having issues and the fac that they use an in house control panel makes it that much harder to move away than if you used something popular such as cPanel/Ensim/Direct Admin/Hsphere

 
Do this (as long as you have SSH access on both servers)
scp -P 22 username@oldserverIP:/home/content/* /home this will copy all of the old files on your old server to the /home directory on your new server where you can do a cp of the files to the domains folder you setup via your control panel.

For mySQL go into phpmyadmin select your database(s) from the left hand side then click on the export tab up top, when all of your tables should be highlighted blue and SQL should be set as the export type automatically. Click on 'Save as file' at the bottom then hit go, this will download your mysql database to your PC.

You can then create the new database on your new server upload the database via ftp and run mysql -urooot -p newDBname

This does not even get into your emails or any other shit but should get your site moved.

As for godaddy they ****, I would drop them and find a real provider with a good control panel such as cPanel. If your current (old) host is using cPanel or even Ensim control panel you can do a backup from that control panel and then just restore on your new server which will be the easiest way.

Godaddy is the sony xplode of web hosts, I would not advise against them for a cheap solution to host noods of your ex or some shit you do not consider mission critical such as family photos but would not use them for business use. I see MANY people switch away from godaddy having issues and the fac that they use an in house control panel makes it that much harder to move away than if you used something popular such as cPanel/Ensim/Direct Admin/Hsphere

I have to agree I hate the control panel for GoDaddy. Do you have another host that's relatively cheap?

And as for the old server, I accessed it through the domain-- I don't know how to find it now. :x

 
Also if when you mean 'server' you are saying you have a dedicated server and do not know how to manage one (ie: you are not a system administrator) then please get someone to do the inital securing, updating and disabling of useless features on the box or your server will probably get owned within a week. By default server companies image server with the default OS install with no updates or patches installed kind of like if you used a 7 year old Windows XP cd to install on your new PC and just left it without patching anything.

 
What are you paying for the godaddy server and what host is the old site with it should say on the hosts site what control panel they use.

For a good basic managed box you are looking at around $200/mo the thing is does your site really use the resources and traffic to justify a dedicated box or did your company just think that would be the best solution (often thought)

Basically if your company is making big $$$ and has the cash to spend on a dedicated it is nice to be the only one on the box so other sites can't create issues for yours, if you are a small company with a couple employees that could use the money elsewhere then there is no real benefit of going with your own box.

 
Also if when you mean 'server' you are saying you have a dedicated server and do not know how to manage one (ie: you are not a system administrator) then please get someone to do the inital securing, updating and disabling of useless features on the box or your server will probably get owned within a week. By default server companies image server with the default OS install with no updates or patches installed kind of like if you used a 7 year old Windows XP cd to install on your new PC and just left it without patching anything.

It's not dedicated-- it's shared.

 
Then I would suggest finding a good cPanel host and using them, that way if the host ****s up and you need to find a new one you can do a backup from the control panel and pick from the other million cPanel hosts out there you can signup with, upload your backup and restore your sites within a few minutes then change DNS.

Time from company to company would be

 
Activity
No one is currently typing a reply...

About this thread

IDSkoT

5,000+ posts
Resonating Reticular
Thread starter
IDSkoT
Joined
Location
Miami, Florida
Start date
Participants
Who Replied
Replies
23
Views
517
Last reply date
Last reply from
darkhunter139
IMG_20260506_140749.jpg

74eldiablo

    May 22, 2026
  • 0
  • 0
design.jpeg

WNCTracker

    May 22, 2026
  • 0
  • 0

New threads

Top