rgb192
asked on
can not connect to mysql
<?php # Script 16.4 - mysqli_connect.php
// This file contains the database access information.
// This file also establishes a connection to MySQL
// and selects the database.
// Set the database access information as constants:
DEFINE ('DB_USER', 'user');
DEFINE ('DB_PASSWORD', 'password');
DEFINE ('DB_HOST', 'gator267.hostgator.com');
DEFINE ('DB_NAME', 'dbname');
// Make the connection:
$dbc = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (!$dbc) {
trigger_error ('Could not connect to MySQL: ' . mysqli_connect_error() );
}
?>
in hostgator I have mysql connection set to
%
which is allow on all ip addresses
so I can connect anywhere with mysql_workbench query editor
this file works on hostgator.com website
but will not work on godaddy shared linux (no output), godaddy dedicated windows (500 error), liquidweb shared (Could not connect to MySQL:)
I ask tech support for liquidweb and they say they do not allow this type of connection on shared, and to ask hostgator who says mysql can connect from anywhere
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks