Can any body help me to get the connection url of the MySQL database on the server of phpmyadmin. I want to access the database remotely.
Please note that the database is not on my local pc hard disk.
Thank you.
Can any body help me to get the connection url of the MySQL database on the server of phpmyadmin. I want to access the database remotely.
Please note that the database is not on my local pc hard disk.
Thank you.
This is the connection URL for access Phpmyadmin MySql server:
Class.forName("com.mysql.jdbc.Driver");//Set driver
connection = (Connection) DriverManager.getConnection("jdbc:mysql://db_ip:3306/dbName",user_name, password);
//Get Connection
If you got below message:
#1130 - Host 'machine name' is not allowed to connect to this MySQL server
Then you need to execute below query:
CREATE USER 'root'@'%';
GRANT ALL PRIVILEGES ON * . * TO 'root'@'%' ;
GRANT ALL PRIVILEGES ON `root\_%` . * TO 'root'@'%';
This query creates the root user with all privilege and password is null.
Edit:
This is the reference may help you: