I am trying to access phpMyAdmin from Ubuntu remotely, and not through localhost on the Ubuntu droplet (DigitalOcean). To do this, I need to change the setup of the config.ini.php in /etc/phpmyadmin.
When running the following code:
<?php
$link = mysqli_connect("ip_address", "username", "password", "mysql")
if (!$link) {
echo "Error: Unable to connect to MySql" . PHP_EOL;
exit;
}
echo "Success: Connected to MySQL" . PHP_EOL;
echo "Host Information: " . mysqli_get_host_info($link) . PHP_EOL;
mysqli_close($link);
?>
I get "mysqli_connect(): (HY000/2002): Connection refused in ...."
Tips to configuration in config.ini.php so I can use the ip address to connect?