Source language: Translate to:

LocalHost

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

LocalHost

Postby datadon » Fri May 30, 2008 11:40 am

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
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby beno » Fri May 30, 2008 11:56 am

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
User avatar
beno
 
Posts: 678
Joined: Fri Apr 01, 2005 9:03 am
Location: México

Postby datadon » Fri May 30, 2008 1:28 pm

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.
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby beno » Fri May 30, 2008 1:54 pm

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
User avatar
beno
 
Posts: 678
Joined: Fri Apr 01, 2005 9:03 am
Location: México

Postby smartmedia » Fri May 30, 2008 10:00 pm

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.
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby datadon » Sun Jun 01, 2008 7:59 am

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
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby dpayer » Sun Jun 01, 2008 10:58 am

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
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby datadon » Sun Jun 01, 2008 11:20 am

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
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby dpayer » Sun Jun 01, 2008 12:24 pm

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/
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby smartmedia » Sun Jun 01, 2008 12:29 pm

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
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby datadon » Sun Jun 01, 2008 1:11 pm

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.
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Re: LocalHost

Postby lordcenon » Tue Jul 29, 2014 10:01 pm

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]"
lordcenon
 
Posts: 1
Joined: Thu Apr 25, 2013 8:25 pm

Re: LocalHost

Postby schmutly » Tue Jul 29, 2014 10:22 pm

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.
Last edited by schmutly on Wed Jul 30, 2014 6:23 pm, edited 2 times in total.
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: LocalHost

Postby Neosoft Support » Wed Jul 30, 2014 9:26 am

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]
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest

cron