How can I connect live server from local server in php mysql. I used below this code, but when I run mysql it throws error "access denied"
error,then I replaced IP Address in placed of host name ,but again same error occurred .But all hostname/IP address,username,password,database all are correct. suppose host name=www.example.com, username=example1, password=12345, database=example2
<?php
$con=mysqli_connect("example.com","example1","12345");
mysqli_select_db("example2",$con); ?>