B4J Question MySQL contact

Jack Bodewes

Member
Licensed User
Longtime User
As a beginner I have a question about mysql.
I made a mysql in phpmyadmin.

sql1.Initialize2( "com.mysql.jdbc.Driver", "jdbc:mysql://localhost:3307/test?characterEncoding=utf8", Name, pass)
Works perfectly

Now I want a different server with a mysql contact
sql1.Initialize2( "com.mysql.jdbc.Driver", "jdbc:mysql://server.com/test", Name, pass)

error:
java.sql.SQLException: Access denied for user 'test'@'a83-160-43-246.adsl.xs4all.nl' (using password: YES)

question:
I can not access my server xs4all?
I can only go to the sql through php?
My network is not good?
 

DonManfred

Expert
Licensed User
Longtime User
I can not access my server xs4all?
Seems to be a restriction of your provider!

Not all provider allows you to connect to your databases fro outside (only from localhost).
In fact; MOST providers does not allow this.

You need to find a hoster which allows access to the database from outside.

I can only go to the sql through php?
php is running on the same server as thedatabase so it can use localhost to build the connection to the db.
My network is not good?
Seems not related here
 
Upvote 0

Jack Bodewes

Member
Licensed User
Longtime User
DonManFred thank you for the explanation to me.
I understand.

Can you give me advice on how I can best work with a database.
What I already have is:
Job.Download to retrieve a database.
And I send a database with FTP.

Do you perhaps know a better way to comuniseren over the Internet.?

Jack.
 
Upvote 0
Top