Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Remote access to MYSQL database from Dreamweaver CC

Community Beginner ,
Apr 15, 2021 Apr 15, 2021

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

751
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 15, 2021 Apr 15, 2021

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.

Paul-M - Community Expert
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2021 Apr 17, 2021

Thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 15, 2021 Apr 15, 2021

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/

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2021 Apr 17, 2021

Thank you for your kindness.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 15, 2021 Apr 15, 2021

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() ?>

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Apr 15, 2021 Apr 15, 2021

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2021 Apr 17, 2021
LATEST

Thank you for your kindness

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines