How do I determine the URL to the database?

Discussion in 'MySQL' started by xarzu, Feb 1, 2015.

  1. #1
    I have installed and created local MySQL test databases and tables on my Windows 7 PC. In order to connect to the database in Java, I need the parameters of the DriverManager getConnection API which includes the username and password and the URL to the database.

    How do I determine the URL to the database?
     
    xarzu, Feb 1, 2015 IP
  2. shureg

    shureg Active Member

    Messages:
    18
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    80
    #2
    try
    http://localhost
    Code (markup):
    or just localhost
     
    shureg, Feb 9, 2015 IP
  3. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #3
    The username may be root. Unless you selected a password when setting up MySQL, the password may be blank. The username might be blank, too, or just "root".
     
    billzo, Feb 9, 2015 IP