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

free web hosting
Free Web Hosting > Computers & Tech > Internet and Websites

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

sparkx
 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 Astahost. I am on the Gamma server if that makes a difference.

Thanks,
Sparkx

Reply

Darasen
QUOTE(sparkx @ Jun 14 2008, 03:08 PM) *
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 Astahost. 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.

 

 

 


Reply

sparkx
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

Reply

Atomic0
I suppose since your hosted with Astahost, you are referring to the MySQL server connected with the server hosting the free Astahost 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://208.87.243.146:2082/, 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.

Reply

miCRoSCoPiC^eaRthLinG
Instead of connecting through an IP, why don't you use your own sub-domain name ? That'd make the connection URI absolute and avoid any of the localhost confusion.

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. mysql url localhost - 13.57 hr back. (1)
  2. what is my mysql ip - 29.25 hr back. (1)
  3. what is my mysql url - 31.43 hr back. (1)
  4. what is my mysql ip? - 38.53 hr back. (1)
  5. cpanel jdbc - 61.97 hr back. (1)
  6. java applet connect mysql - 62.60 hr back. (1)
  7. localhost mysql website url - 80.37 hr back. (1)
  8. mysql error number 1045 connecting from java - 96.42 hr back. (1)
  9. java work with mysql localhost but no with ip - 119.97 hr back. (1)
  10. jdbc what is my url - 137.75 hr back. (1)
  11. jdbc:mysql: get database url from phpmyadmin - 138.52 hr back. (1)
  12. connecting php to a url - 143.19 hr back. (1)
  13. java jdbc mysql "access denied" - 164.93 hr back. (1)
  14. java connect to mysql database method - 164.99 hr back. (1)
Similar Topics

Keywords : mysql, url

  1. Mysql With My Own Server
    few questions (4)
  2. Mysql Problem
    and i spose phpmyadmin (0)
    well, yesterday i was trying to make a database on my computer with phpmyadmin. It worked the day
    before and all the other times but now it wont let me, access is denied. I just get an error (1045
    Access denied for user root@localhost using password :no) so basically wot do i do? i hadnt touched
    anything, it just stopped working. i cant think of anything that could have happened besides that my
    IP had chnged from the last time i used it. i cant use phpmyadmin or the command line. oh and im
    using xampp by the way, and its on my jumpdrive using portable apps. anyone kn....
  3. Free Mysql Server Sites
    Give me some links ;) (9)
    I wonder if u guys know any free Mysql server hosts, if u do post the web adress here /biggrin.gif"
    style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> ____________________
    Have a nice Summer....
  4. What To Look From A Java Hosting Service Provider
    (1)
    Is it just me ? I see very few Java Hosting Providers compared to the ones with ASP and PHP. Agreed
    Java is the first choice in upscale environments, however being open and free, I thought I would
    bump into many cost friendly Java Hosting providers, but in vein. It seems Microsoft still rules in
    low end market. What should we look for from a Java Hosting Service Provider ? I have listed my
    priorities in descending order. Please comment. 1) Look at the file storage and band width
    requirement. 20 MB disk space is decent enough size to start with. Band Widths provided by ....
  5. Ten Free Java-script Resources
    (0)
    Ten website for free java-script resources http://www.wsabstract.com http://www.java-script.com
    http://www.hotscripts.com http://www.webteacher.com/java-script/index.html
    http://www.java-scripts.com http://java-script.internet.com http://www.pageresource.com
    http://java-script.about.com http://www.webdeveloper.com http://www.programmingtutorials.com ....
  6. Free Java Script
    make your site look great! (2)
    i love this...i dont know java or a lot of dhtml...but i love to put it in my sites because it makes
    them that much better there are tons of sites out there that give you javascripts for free
    dynamicdrive - dhtml...(happy killer008r /tongue.gif' border='0' style='vertical-align:middle'
    alt='tongue.gif' /> ) javascriptkit flashkit javafile java-scripts codehouse little bit
    bigger list... they have great dhtml games and java applets that run great and are easy to insert
    into your page...if you dont already use these or use your own java scripts you shou....

    1. Looking for mysql, url

Searching Video's for mysql, url
advertisement




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



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE