Remote SQL Database connection script php - php

remote sql database connection script php

 
  • HOME  • tutorials  • photos   • free grafics design   
   



CATEGORIES
EXCEL TUTORIAL
SQL TUTORIAL
WEB INFORMATION
WINDOWS
JAVASCRIPT SCRIPTS
COMPUTER SECURITY
GRAFIC DESIGN
HTML
PHP
CSS STYLE
ATLAS OF THE WORLD
DEVELOPER
PHOTOSHOP
MAGAZINE
LATEST ARTICLES
how to insert decimal values into a sql table row
asrep.com adsense traking script is down
list of walt disney animated movies
free php and ajax captcha scripts
convert uppercase to lowercase javascript online script
detect and block uppercase (up letters) in a string (form text input) php script
php googlebot detection script
replace breaking lines in text or textarea input using php
rounded borders corners css without images
photoshop styles, asl photoshop style free download
  home   PHP » REMOTE SQL DATABASE CONNECTION SCRIPT PHP
google ads
 
 
 


REMOTE SQL DATABASE CONNECTION SCRIPT PHP


REMOTE SQL DATABASE CONNECTION SCRIPT PHP




    Many people asking if is possible to acces and connect to a remote MySql database, if the connection is possible using a php script from a server with a SQL database wich is on another server.
Yes is possible.
   And sometimes this action can be extremely useful instead to use file_get_contents or curl or other HTTP methods that can consume extremely CPU resources leading to exceeding the CPU policy of hosting accounts.







php script:

<?

$server = "33.432.250.44"; //remote database server ip
$dbname = "nameofdatabase"; //remote database name
$user = "nameofuser"; //remote database username
$password = "password"; //remote database password

$link = mysql_connect($server,$user,$password) or die(mysql_error());
mysql_select_db($dbname);
 


$SQL = 'SELECT * FROM `table` ';
$result = mysql_query($SQL);
while($row = mysql_fetch_array($result)) {
$dt=''.$row['nameoftablerow'].'';
}
echo $dt;

?>



NOTE: 
 For almost all hosting servers ( where is remote SQL Database ) in cpanel you can to set (if the server settings request) allowing acces for the server ip where is the php script.
The section is named Remote MySql or something like this.
 


ARTICLES IN REMOTE SQL DATABASE CONNECTION SCRIPT PHP CATHEGORY

Zero result!!



Tags : remote sql server connection,remote sql access,remote sql server connection string,remote query sql,






Leave a comment
Your name *
E-mail * ( it not be posted)
Comment title *
Your comment *
   Anti Spam (fill the number CASE SENSITIVE - UP LETTERS ) *

There are no comments ...The page was not find

 

 

the latest articles :
• How to insert decimal values into a SQL table row
• Asrep.com adsense traking script is down
• List of Walt Disney animated movies
• Free PHP and AJAX CAPTCHA scripts
• Convert uppercase to lowercase javascript online script
• Detect and block uppercase (up letters) in a string (form text input) php script
• Php Googlebot detection script
• Replace breaking lines in text or textarea input using php
• Rounded borders corners css without images
• Photoshop styles, asl photoshop style free download

 

eXTReMe Tracker