Jump to content

Recommended Posts

Posted

is it possible to connect to webserver database?

 

i am able to connect to local host.

 

help me.

Posted

The process will be the same as connecting to localhost. Replace the "localhost" string with the IPv4 for the connection(might need the port number).

 

Make sure the offsite hosted sql server allows remote connections.

Posted

thanks,

 

Hi,

 

In my project i need to connect webserver MySQL database without installing ODBC.

It is possible?

 

In my localhost it works correctly, my code for connecting localhost MySQL database as below

 

(setq dbConnString

(strcat "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=localhost;"

"DATABASE=localhostdb; UID=localhostusername; PWD=localhostpassword; OPTION=3"

)

 

I try for webserver MySQL as below, but it displays error

 

(setq dbConnString

(strcat "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=webserverhostname.com;"

"DATABASE=dbname; UID=webserusername; PWD=webserverpassword; OPTION=3"

)

error: ......Microsoft OLE DB Provider for ODBC Drivers: [MySQL][ODBC 5.1 Driver]Can't connect to MySQL server on 'webserverhostname.com'

 

pls tell me , how to connect webserver MySQL database

Posted

There's one of 2 things which may be occurring: (1) the machine running your code could have a firewall which prevents connections on the default MySQL port number; or (2) the server doesn't allow direct remote access to the MySQL db. I think the later is what's happening as this is the default behaviour for MySQL, it's meant to run on a web server through a local PHP engine - so the data gets sent as html pages instead of direct db connections (it's more secure that way).

 

You could set the MySQL server to allow remote access. But that's not going to fix your "other" problem. The connect string you're using requires the MySQL ODBC driver to be installed on the client PC. Unfortunately I don't know of a way to get around this. Perhaps some way of linking lisp to a web page instead, then design a PHP page to retrieve the data from the local MySQL server into html and send this to the client PC. But this is probably going to be quite an involved thing though.

Posted

pls tell me how to enable the remote connections in webserver

Posted

We'll need more info, when you say "webserver" what brand / make / OS / etc. There are numerous types and each have their own settings. But that's probably something you'd be able to get from that particular brand's forums (instead of here), or even the MySQL forums perhaps.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...