473,464 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem mysql_connect : Help ?

Paris,
Le 30 08 MMVII,

Hi,

I have a problem using to connect to MYSQL from one server to another
server.

In other words, On server A, I have my PHP files, and on server B, I
have MySQL installed.
Localhost is fine, but an I.P. as a host lead to an error : Warning:
mysql_connect(): Can't connect to MySQL server on '207

Here is what I got :

1) CONFIG.PHP
$dbtype = "mysql"; ##Defines Database type
$dbhost = "207.36.15.13:3306"; ##Your host
$dbuname = "maincontheaderbox"; ##Database Name
$dbpasswd = "bobyken"; ##Database Password
$dbase = "z_extras";
maincontheaderbox is the root user getting all previleges.

Comment : I mentioned PORT 3306. Not sure at all of that port (from
OVH french.hosting services)

2) my.cnf

I ensured that my.cnf does not forbid outside mysql connections.
skip-networking.
http://guides.ovh.com/ConnexionDistanteMySQL

3) Doc
- http://forum.ovh.com/archive/index.php/t-5716.html
- http://fr.php.net/mysql_connect

http://drupal.org/node/55108
$db_url = 'mysql://My_Account_Name(A)_username:password@localhost/
My_Account_Name(A)_databaseName';

Many thanks for your help from your knowledge and experience.

Bob

Aug 30 '07 #1
1 1904
On 30 Aug, 10:51, goodm...@fiduciairedefrance.com wrote:
Paris,
Le 30 08 MMVII,

Hi,

I have a problem using to connect to MYSQL from one server to another
server.

In other words, On server A, I have my PHP files, and on server B, I
have MySQL installed.
Localhost is fine, but an I.P. as a host lead to an error : Warning:
mysql_connect(): Can't connect to MySQL server on '207

Here is what I got :

1) CONFIG.PHP
$dbtype = "mysql"; ##Defines Database type
$dbhost = "207.36.15.13:3306"; ##Your host
$dbuname = "maincontheaderbox"; ##Database Name
$dbpasswd = "bobyken"; ##Database Password
$dbase = "z_extras";
maincontheaderbox is the root user getting all previleges.

Comment : I mentioned PORT 3306. Not sure at all of that port (from
OVH french.hosting services)

2) my.cnf

I ensured that my.cnf does not forbid outside mysql connections.
skip-networking.http://guides.ovh.com/ConnexionDistanteMySQL

3) Doc
-http://forum.ovh.com/archive/index.php/t-5716.html
-http://fr.php.net/mysql_connect

http://drupal.org/node/55108
$db_url = 'mysql://My_Account_Name(A)_username:password@localhost/
My_Account_Name(A)_databaseName';

Many thanks for your help from your knowledge and experience.

Bob
Do not multi-post. Cross-post if you must but don't multi post
It waste's people's time.
http://www.blakjak.demon.co.uk/mul_crss.htm

Aug 30 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: das dsf | last post by:
Hi there! I have both PHP 4.0( RPM) installed and MySQL 4.0.20 installed with the mysqld daemon up and running. But when I look at the output of phpinfo() , I do not see it there, which is...
12
by: Gustaf Liljegren | last post by:
I've been learning using PHP and MySQL from the tutorial at freewebmasterhelp.com. Everything works fine, except deleting things. The script is invoked with a URL like this: ...
1
by: Bob Garbados | last post by:
I have the following sitution... MySQL version 3.23.47 PHP version 4.3.2 Redhat Linux version 7.1 Apache version 1.3.29 I have a MySQL user called 'user' that is set up with full rights for...
2
by: Sugapablo | last post by:
I have a small test script connecting to a MySQL database. It seems to work, unless I try to use the resource link identifier returned by mysql_connect(); This works and returns all the rows in...
19
by: Michael | last post by:
Hi, I'm trying to do something which should be very simple - connect to the MySQL database. Here is the call, followed by the error msg. $conn = mysql_connect("localhost", "root", ""); ...
6
by: TonyB | last post by:
I'm running the zip'd version of PHP (PHP 5.1.2 zip package) downloaded from here: http://www.php.net/downloads.php. PHP won't connect with MySQL. >From docs and threads, it seems enabling...
8
by: dude | last post by:
this is the code: $user = "user"; $pass = ""; $connect = mysql_connect('localhost',$user,$pass); or die('could not connect: '. mysql_error()); mysql_close($connect); i'm a beginer, and i...
6
by: GD | last post by:
Hi All, I've got MySQL 5.0.21 running on Windows Server 2003, and php running on Apache on a Linux box (Fedora Core 4). Previously when the pages were running on an IIS server the connection...
10
by: paul814 | last post by:
I am having a bit of a problem with some code....can someone give me some suggestions? Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\production \date2.php on line 28 line 28 is...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.