Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 629
  • Last Modified:

how to connect remote coldfusion to remote mysql

Hi folks,
    I am working on a remote ColdFusionMX 6.1 server and want to be able to query my (home) remote MySql server with my queries from a remote host. I fully understand dsn's when i use them with the MySql server that our hosting company provides, but i am trying to use one from home so that i am not limited on space. I imagine i need a dsnless connection string to connect to a remote mysql right? when i run my winmysql 1.4 it tells me the server information (at home) is 4.0.18-nt. I would really appreciate a little snippet of code on how to impletment it with something like this..anyway, this is how i use it when i am not trying to access my home. Thanks for all the help.

<cfquery name="test" datasource="howden">
Select * from mold4 ORDER BY mold ASC
</cfquery>
0
dittymeister2
Asked:
dittymeister2
  • 4
  • 4
1 Solution
 
mrichmonCommented:
your home machine needs to have some way of accessing it.  Either a static IP or a dsn.
0
 
dittymeister2Author Commented:
I have a dsn set up for it and access it local fine, but i am wondering how to use a dsnless connection string in from my remote coldfusion host.
0
 
mrichmonCommented:
well if it is CF MX or higher then it no longer uses dsnless connections
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
dittymeister2Author Commented:
Ok, forget the dsnless for a moment. How do i connect from remote ColdFusion host to My home MySql Sever. Can it be done? How do i set my page up for something like that if it can be done. If it cannot be done i will have to buy more space with my host and upsize the MySql server with them, or move it over to the Sequel Sever i have with them. Thanks for any input from anyone on this topic :D.
0
 
mrichmonCommented:
Well, that depends on if you have actuall interface to CF Admin through your CF host or just a "control panel" interface that they built.  For example, CrystalTech does not give direct access to the CF Admin they give their own interface for adding datasources.

If you do have access it should be possible
1) You have a way to connect to your database server.  Such as Having a static IP.
2) In CF Admin you set the IP as part of the datasource connection.
3) Enter username, password, and other attributes
4) Test datasource.
0
 
dittymeister2Author Commented:
Ok, I only have access to a control panel like mentioned above and don't have access to the CF Admin. Isn't there a way to hard code it in CF to look toward my home mysql and find the dsn that is just waiting for it there? Also, i do know exactly what you are talking about with the CF Admin. I use it here at home as "the testing server" and create the dsn's to connect to my hosts MSSQL or MYSQL etc....

I guess i am looking for code in CF that would be like PHP where you define the server, database, username, pass etc..and can connect right up. I use Dreamweaver and when i do <cfquery> and in code view, edit the tag, it seems like there are lots of options to define such code, but have not figured it out,  if it's even  possible.

Thanks for the support
0
 
dittymeister2Author Commented:
Oky Doky,
I was checking it everyday hoping for some more feedback.
Thanks for the people that did try and help and participate.

How bout splitting the points amonst everyone who responded. Is this feasible?

Thanks again everyone.

0
 
mrichmonCommented:
Yes it is.  At the bottom of a question where you type a comment there is a link just above that that says "Split Points"

Click that and it will let you split points among whatever answers you choose.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now