Go Back   Computer Juice > Computer Software > Web Design, Hosting & SEO
Register Members New Posts Donate Unanswered Posts Site Spy Search


Reply
 
Thread Tools
  #1  
Old 20-02-2008, 07:26 AM
MySlowQuietLife's Avatar
CJ Member
 
MySlowQuietLife is offline
 
Join Date: Feb 2008
Last Online: 30-03-2008 08:26 PM
Posts: 54
iTrader: (0)
MySlowQuietLife is on a distinguished road
Default mysql and hosting company

After looking into apache i have decided i will continue to use a hosting provider
I have a problem though.
I have mysql5 database on my comp and php5 i have created several tables in my database and i would like to keep them.

The thing is i am connecting to my database through the hosting company and it wont connect.

I have the username password and db name completly setup but i feel its the host name thats giving me problems.
what would i use?
Usualy when i was doing this through apache it would be localhost but im not sure this could be now.
Ive tryed my comps IPv4 address but not working not sure it was the right thing to do anyway.
Thanks people for all the help lately.
Digg this postDel.icio.us this postTechnorati this postNetscape this postStumble this post
Reply With Quote
  #2  
Old 20-02-2008, 01:01 PM
leoh187's Avatar
leoh187  United Kingdom
CJ Donator
 
leoh187 is offline
 
Join Date: Nov 2007
Last Online: 07-08-2008 08:54 PM
Posts: 57
iTrader: (0)
leoh187 is on a distinguished road
Default mysql and hosting company

Hi

If you are trying to connect to your MySQL database on your computer from a page on your hosting companies servers you have a number of problems.
It is unlikely that the hosting company will let connections to external servers out throught their firewall for security reasons. You should check this.
If they do allow connections though then you will need to set the host name to your public ip address(do you have a static ip address?). Then if you have a router at your location, you will need to forward port 3306 to the computer that has the mysql server on it.

Even doing this you will have problems with a slow site because of the path the data has to travel.
At the cost of hosting with mysql server installed, I don't think its worth the extra effort and problems of using your computer.

Is this the way you want to do it, or the other way (to your host)?

I hope this helps and makes sense.

Please do not hesitate to contact me if you have any questions.

Many Thanks

Leo
Digg this postDel.icio.us this postTechnorati this postNetscape this postStumble this post
Reply With Quote
  #3  
Old 20-02-2008, 04:10 PM
MySlowQuietLife's Avatar
CJ Member
 
MySlowQuietLife is offline
 
Join Date: Feb 2008
Last Online: 30-03-2008 08:26 PM
Posts: 54
iTrader: (0)
MySlowQuietLife is on a distinguished road
Default mysql and hosting company

Thanks leo.
after many discussions with hosting service i finaly found out they infact they do not let me connect to an outside source (firewall and stuff).
Thanks very much for the reply.

Ben

P.S it took me 5 hours of im messaging for them to tell me this and i asked the question 20 times at least aaarghhhhhhh
Digg this postDel.icio.us this postTechnorati this postNetscape this postStumble this post
Reply With Quote
  #4  
Old 20-02-2008, 09:00 PM
leoh187's Avatar
leoh187  United Kingdom
CJ Donator
 
leoh187 is offline
 
Join Date: Nov 2007
Last Online: 07-08-2008 08:54 PM
Posts: 57
iTrader: (0)
leoh187 is on a distinguished road
Default mysql and hosting company

Hi

Glad you've got to the bottom of it. Sounds typical of some web hosts!

Many Thanks

Leo
Digg this postDel.icio.us this postTechnorati this postNetscape this postStumble this post
Reply With Quote
  #5  
Old 22-02-2008, 09:25 AM
No Avatar
dr john  United Kingdom
CJ Member
 
dr john is offline
 
Join Date: Oct 2007
Last Online: 21-04-2008 11:25 PM
Posts: 69
iTrader: (0)
dr john is on a distinguished roaddr john is on a distinguished road
Default mysql and hosting company

Why not simply transfer the database and PHP scripts to the hosting service. Then you don't have to give the outside world access to your PC, not do you have to keep Apache running on your own PC all the time, nor do you have to keep your own PC switched on all the time, nor do you need a static IP address, nor do yo uhave to worry about your PC crashing and needing a re-boot, nor do you have to handle database back-ups.

It also means you can experiment with ideas and not screw up the online database by trying things on your copy first before transfering them over and going live.

Hosting that includes mysql is so cheap (it's often thrown in for free) that whatever you value your own time at, it would cost less than the five hours you spent talking to them and the time you spent trying to solve the problem.

Last edited by dr john : 22-02-2008 at 09:26 AM.
Digg this postDel.icio.us this postTechnorati this postNetscape this postStumble this post
Reply With Quote

Please support this forum, donate towards our running costs.


Reply


Thread Tools

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP mysql, creating a drop down list that takes fields from table in mysql Samantha0101 Web Design, Hosting & SEO 19 05-04-2008 02:25 PM
webserver help with mysql Drewski526 Web Design, Hosting & SEO 1 19-11-2007 07:21 PM
Free Hosting VS Paid Hosting! Travis2k7 Web Design, Hosting & SEO 1 31-08-2007 02:05 AM
what is the best company for web hosting? zaida m Web Design, Hosting & SEO 1 30-03-2007 09:36 PM
What is the best Apache/PHP/Mysql package for... firesauce Windows Operating Systems 2 19-03-2007 04:06 AM


Copyright ©2006 - 2008 Computer Juice.

Powered by vBulletin® Copyright ©2000 - 2008 Jelsoft Enterprises Ltd. SEO by vBSEO ©2008, Crawlability, Inc.

Page copy protected against web site content infringement by Copyscape