Jump to content
xisto Community
Sign in to follow this  
sparkx

What Is My Mysql Url (connecting Through Java/jdbc)

Recommended Posts

 I have been working on a java applet that requires access to a MySQL database. I have been receiving an error. When I run the file my applet tries to access the user’s database not my server's database! I was using the mysql:localhost/database... method just like in PHP but apparently localhost doesn't mean the same think in Java. Seems funny but I need to know the location (URL) to the MySQL databases on Xisto. I am on the Gamma server if that makes a difference.Thanks,Sparkx

Share this post


Link to post
Share on other sites

I have been working on a java applet that requires access to a MySQL database. I have been receiving an error. When I run the file my applet tries to access the userâs database not my server's database! I was using the mysql:localhost/database... method just like in PHP but apparently localhost doesn't mean the same think in Java. Seems funny but I need to know the location (URL) to the MySQL databases on Xisto. I am on the Gamma server if that makes a difference.
Thanks,
Sparkx


Just for future reference they do mean the same thing the difference lies in where the code is being executed. With PHP the code is being ran by the server hence the server is the local host. With Java the code is being executed client side thus localhost is going to be the users machine.

Share this post


Link to post
Share on other sites

That was just a phrase to keep my post shorter and more to the point. Localhost in PHP means the server IP and localhost for java means the client's IP. I am quite aware of the basics of JDBC and PHP in MySQL. I simply need to know the URL to my MySQL server. This is just one of the things that I don't like about the new Cpanel (Cpanel X). The old one told how to connect to each individual database.Thanks,Sparkx

Share this post


Link to post
Share on other sites

I suppose since your hosted with Xisto, you are referring to the MySQL server connected with the server hosting the free Xisto hosting account. The IP address of the MySQL server should be the same as the IP address for access to cPanel (e.g. if your cPanel is hosted on http://forums.xisto.com/no_longer_exists/, then the MySQL server is also at 208.87.243.146). Try and see if that works.

 

Update:

I just checked phpMyAdmin which refers to the MySQL server as localhost. Therefore, it is highly likely the MySQL is also hosted on the same server as the cPanel.

Edited by Atomic0 (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.