java mysql connection across network

I need to connect to a mysql database across a network. The connection string ive given is

"jdbc:mysql://host/dbname"

i can access the site across the network but the only problem is with the java database connection. Ive updated the phpmyadmin.conf file giving

# Deny from all
 Allow from all

But still the database connection cannot be made. Please help me..

Answer

I don’t know much aboud phpmyadmin, but what I did to configure a remote db:

  1. The connection string is: jdbc:mysql://host:port/dbname
    • The port is 3306 by default
  2. The mysql user is often [email protected], you need to configure a user for the remote (client) machine (IP address, hostname, wildcard)

HTH

Leave a Reply

Your email address will not be published. Required fields are marked *