Page 1 of 1

LocalHost

PostPosted: Fri May 30, 2008 11:40 am
by datadon
I've been using NeobookDBPro with the Access databases for a while and it works great and is easy to use. I now need to connect to my online server so I can connect up to a MySQL database. The part about localhost in the script confuses me. What does that mean? Is it the url of the site where the database resides? I think that may not be correct.

Can someone explain to me what that means and what it takes to show my database in a grid. I could not find anything about it specifially in the help file that explains it to my satisfaction.

Thanks

PostPosted: Fri May 30, 2008 11:56 am
by beno
Hi Don,

Localhost is your own computer. This is; if you have a web server running local (on your own PC) then you are localhost (well, your PC :wink: ).

If your MySQL database and webserver are running in another PC in your LAN then you will have to use its IP address to access the database.

To access the database then you will need: the IP address of the machine where the database/webserver resides, the database name, the user and password.

It is a little bit tricky but easy.

HTH,

beno

PostPosted: Fri May 30, 2008 1:28 pm
by datadon
Thanks Beno

I guess I need to be a bit more clear about what I have. I have whm and cpanel access to a server that is located in Tennessee (I think). I pay a certain amount for a certain amount of space that I can put website on.
If I create a MySQL database on one of my sites I would like to access it via the NeoBookDBPro application that I create on my local computer.

To do that I would think that would need to know the URL, username, password and database name as a minimum. Something like an FTP access. Do I have this concept wrong.

As an example, if the site is called mywebsite.com, the username is myusername and password is mypassword and the database is called mydatabase, and a table is called mytable, what would I need to do to an action script to display the database in a browser.

PostPosted: Fri May 30, 2008 1:54 pm
by beno
Hi Don,

I see, your database is in a remote webserver.

Let´s say your username (account name) to log into your website is: datadon

In this case you will use:

Server: mywebsite.com
User: datadon_myusername
Password: mypassword
Database: datadon_mydatabase

Using these parameters you´ll be able to interact with the database using any NBDBPro action.

Another approach would be to interact with you database using forms in a webpage, the WebBrowser Object and php.

HTH,

beno

PostPosted: Fri May 30, 2008 10:00 pm
by smartmedia
Hi...

Except that Beno mentioned you must set your server to accept connection from remote computer. The steps are very easy, as notice you have CPANEL.
Go at Manage Remote MySQL Access if you have static IP you can entered here, otherwise if you have dynamic you must enter in Access Hosts a willcard, so enter % and you ready.

PostPosted: Sun Jun 01, 2008 7:59 am
by datadon
Thanks to all your help I am getting closer. I tried to test my connection and get a message like this:

Microsoft ODBC DRIVER MANAGER DATASOURCE NAME NOT FOUND ETC.

Any ideas on what that means?

Thanks

PostPosted: Sun Jun 01, 2008 10:58 am
by dpayer
datadon wrote:Thanks to all your help I am getting closer. I tried to test my connection and get a message like this:

Microsoft ODBC DRIVER MANAGER DATASOURCE NAME NOT FOUND ETC.

Any ideas on what that means?

Thanks


Did you install the MyODBC driver on your computer?

D

PostPosted: Sun Jun 01, 2008 11:20 am
by datadon
Apparently I did not. Is that something that just happens or do I need to go get one somewhere? I will search google and see what I can find.

Thanks

PostPosted: Sun Jun 01, 2008 12:24 pm
by dpayer
datadon wrote:Apparently I did not. Is that something that just happens or do I need to go get one somewhere? I will search google and see what I can find.

Thanks


http://www.mysql.com/products/connector/odbc/

PostPosted: Sun Jun 01, 2008 12:29 pm
by smartmedia
Hi...

If you are using MySQL database you need the mysql-connector-odbc to be installed into your PC. I use 3.51 You can download it from here.

Thanks

PostPosted: Sun Jun 01, 2008 1:11 pm
by datadon
Of all things, I actually made a connection and got it to display. Thanks to all of you for helping this ole boy through. There seems to be a lot that needs to be said in the help file about this that is not there. At least I did not find it.

Let me revise what I just said. Now that I know what I need to do it is clear in the help file now, but not knowing I was not understanding correctly. Perhaps a step by step checklist of what needs to be done and some examples of code with real examples that are required would help. Maybe a link to the driver would be good also. Just suggestions that might have helped me.

I know the varities of databases make that all difficult. Bottom line is the folks here helped me get it right.


I guess there are a lot of things to learn depending on what database you want to connect to. If you are used to this while doing it on your server then it is no big deal but for those who like me need the extra help.

Again, thanks for the forum help on this. I learned a lot.

Re: LocalHost

PostPosted: Tue Jul 29, 2014 10:01 pm
by lordcenon
I tried to replicate this situation, even downloaded the ODBC.

But I am having this message:
[MySQL][ODBC3.51 Driver]Access denied for user 'myname_user'@'ipaddress'(using password: YES)

What could be the problem here.

This was the script I used:

dbpOpenDatabase "myalias" "Provider=MSDASQL.1;Password=mypassword;Persist Security Info=True;User ID=omleus_myname;Extended Properties=[#34]Driver={MySQL ODBC 3.51 Driver};Server=www.mydomain.com;Database=omleus_database;User=omleus_myname;Option=3[#34]"

Re: LocalHost

PostPosted: Tue Jul 29, 2014 10:22 pm
by schmutly
Usually get that if password is wrong. My string is:
dbpOpenDatabase "DBFile" "Provider=MSDASQL.1;Driver={MySQL ODBC 3.51 Driver};Server=[serverip];Database=[databasename];User=[dbusername];Password=[dbpassword];Option=3"
So its the same except you have a space for the username as: User ID and i think it needs to be just user_ID or user...could be wrong.
Rob

EDIT:
Forgot to add that i connect to my MySql DBs on my VPS but i needed to add my WAN Address to the Remote MySql page in your Cpanel.
Not sure if Dave's link below is to that.

Re: LocalHost

PostPosted: Wed Jul 30, 2014 9:26 am
by Neosoft Support
In order to connect to an online database, you must use a host that provides a "remote connection" option. The post below describes this in more detail:

[url]viewtopic.php?f=7&t=18262&p=11200962[/url]