Copy link to clipboard
Copied
I am using the Dreamweaver CC version. My WebHost is Bluehost. Please be kind enough to help me remotely connect with the MQSQL database of the Bluehost server from Dreamweaver CC in the PHP enviroment. I need a Remote connection, not a Testing server.
Could you please help me with the necessary coding for this?
Thank you
Upali Jayasinghe
Copy link to clipboard
Copied
if the hosting includes cPanel look for an options Remote MySQL and add your IP address, usually you need to whitelist an IP to allow remote access to MySQL. If no cPanel option is available check with your hosting company.
Copy link to clipboard
Copied
Thank you
Copy link to clipboard
Copied
During development and debugging, I prefer to work locally which is to say I DO NOT connect with remote server data. Instead, I export remote data to SQL and then import the SQL file to my local server's database with phpMyAdmin. When I'm convinced my app works as it should locally, then I deploy it to the remote server.
I have phpMyAdmin on both servers. It's a very useful app for working with SQL data. Get familiar with it.
phpMyAdmin Documentation
https://www.phpmyadmin.net/docs/
Copy link to clipboard
Copied
Thank you for your kindness.
Copy link to clipboard
Copied
Copy & paste this code into a new PHP file called test.php and upload to your server.
<?php
$con = mysqli_connect("localhost","your_username","your_password","database_name");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else echo "Successfully connected, happy coding!"
?>
<?php phpinfo() ?>
Copy link to clipboard
Copied
personally, I have few applications that reside locally on test servers, applications that then need to be pushed online, in fact, I work most of the time online directly on applications that are in production.
I don't know if this is your question. but if you need to connect to a remote database, you need to know the url of the MySql server, the name of the database, the user and his password.
if you didn't create this database, you should contact the network administrator who set it up.
another possibility, as Paul advises you, is to access this database from the administration interface of your server. you can then either reset the database user's password (if you don't know it and if you are sure to be the only user of this database) or create another and different user
Copy link to clipboard
Copied
Thank you for your kindness
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more