Connect to DB from local site

Status
Not open for further replies.

epoclaen

Member
Messages
79
Reaction score
0
Points
6
I want to be 100% clear on what I want to do here.

I am building my website on my local computer using PHPdesigner 2008. This includes a Debug feature which scans the .PHP file and tests it before I publish the page to my website. It uses the MySQL database to identify users and to store their preferences.

PHPdesigner 2008 allows you to link to the database and even to develop querys based on the table and field information that is retrieved. This was a major selling point for me.

Don't confuse this with other issues where users could not connect to their database from a file that was already uploaded. Mine works fine once the file is uploaded using "localhost" as the server, my user name as the user and my database password for the connection. I'd just like to be able to work on my website without constantly having to upload my file to test it.

The problem comes from attempting to run the debugger which stops on the mysql_connect(); line with an error of "unable to connect to the database". I've tried allowing connections in cpanel from my IP address but that didn't seem to do the trick. I've tried using 70.87.51.250:2028 as the server and giftlist.x10hosting.com:2028 as the server to see if I could avoid using "localhost" as the server. I tried exporting the database using phpMyAdmin in an attempt to setup a complete duplicate of the remote website on my system but heck if I know what to do with the exported SQL file from there or where it should be saved.

I've read that this might be because I need to set up a server on my machine. Sheesh! How hard can such a basic thing get? So I downloaded xampp and ran the server from a new E: drive partition on my machine (my attempt to run it from the C: drive failed). Either I don't have the server setup properly or this isn't working either.

So this forum is my last resort. Surely there has to be someone here who is familiar with this situation and has some suggestions for a solution? Any clarification or suggestions would be greatly appreciated. I'll also be posting to the PHPdesigner forums to see if it's an issue on their end.

And yes, I'm aware that there is currently a problem on the Ciroc servers that is being addressed but this issue occurred before the problem began.

Thanks,
Jeff
 
Last edited:

aneotoena

New Member
Messages
798
Reaction score
0
Points
0
You'll need to set up a local(in your pc) sql server (you'll have to search how to).

You won't be able to connect remotely to x10 mysql since firewall won't allow it. X10 can't allow you to do this unless you have an static ip address, which most people doesn't have.
 

1337scape

New Member
Messages
78
Reaction score
0
Points
0
Having a static IP, isn't the issue, because I hate the same problem. Because they don't add your static IP to their firewall, they add your external IP..meaning the IP that you get when you go to http://whatismyip.org. But actually do make sure to have a Static IP, because without it, your External IP will always change.
 

Blazer9131

New Member
Messages
411
Reaction score
0
Points
0
You need to get Brandon's or Chris's attention, DON'T PM THEM THOUGH! They will need to add your IP to x10's firewall, allowing the two server's to connect. PM me and I will help you set up a MySQL host on your computer, and help get connected with x10.
 

epoclaen

Member
Messages
79
Reaction score
0
Points
6
Well I found how to configure PHPdesigner to work with xampp from the PHPdesigner forums and I got the phpMYadmin going too and was able to run the downloaded .sql file to load the database into my SQL server. Incidentally, don't be tempted by xxampp's Windows Control Panel interface - just use the command prompt to run the Apache server and start mySQL. The tenacity of the Control Panel was troublesome at best.

Ideally, I'd say a direct connection through the x10hosting firewall is the best way to go if that's possible but if Brandon or Chris find that it's not feasible, what other options are there? I can get the Apache mySQL server to use the same mysql_connect settings as the website (I think) but it's all such a kludgy fix for something that I'd think other people have found cleaner solutions to managing. Maybe some other PHP editor software like Zend or something that does a better job of handling mySQL database testing?
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
I like dreamweaver ;).

PM me your IP and I'll add it to the firewall.

-Corey
 
Status
Not open for further replies.
Top