Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th June 2011, 01:24
liloman liloman is offline
Junior Member
 
Join Date: Jun 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Using remote MySql from ISPConfig server

Hi all,

I updated my ISPConfig to the last version 3.0.3.3
I created a client with his respective database. The database has in the Remote Access IPs textfield the IP of an external hosting.

The idea is using this mysql database in another external hosting to manage a forum.
The problem is that I'm not abble to use in my external hosting the mysql server (provided by the ISPConfig).

I filled up all the parameters in the config.php in my forum with the IP, user and password info.

When I try to acces to the forum it doesn't work. My Internet browsers says "The connection has been reset".


What I'm doing wrong?

It is possible to use the mysql server in another server? They are in separate networks.
Reply With Quote
Sponsored Links
  #2  
Old 29th June 2011, 02:17
liloman liloman is offline
Junior Member
 
Join Date: Jun 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I realized a simple test with another external hosting trying to obtain simple records from my mysql server.
I finished all the lines which try to conect to DB with the function "or die (mysql_errno());"

The result when I go to test.php is:

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /XXXX/test.php on line 10
Lost connection to MySQL server at 'reading initial communication packet', system error: 111

In the line 10 there's the 1st sentence connection:
mysql_connect($dbhost,$dbuser,$dbpasswd) or die (mysql_errno());

I have to say the external hosting is not a slave of the mysql server. I mean, I have just ISPConfig in the mysql server. The other hosting is a VPS so I can't install anything else.
The forum is running in the VPS. As traffic has increase I need a powerful mysql server to respond all the user petitions. So I chose a dedicated server running the ISPConfig just to bring the DB.


Should I configure something else in the ISPConfig to be able to acces to its mysql from another server which is outside its network?

Last edited by liloman; 29th June 2011 at 02:26. Reason: I forgot the last sentence
Reply With Quote
  #3  
Old 29th June 2011, 09:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,070
Thanks: 826
Thanked 5,396 Times in 4,240 Posts
Default

Have you configured mysql to allow connections from other hosts in my.cnf file and did you open the mysql port in the firewall if you use one? Please post the output of:

netstat -tap | grep mysql

and also the output of:

iptables -L
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 29th June 2011, 11:43
liloman liloman is offline
Junior Member
 
Join Date: Jun 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Netstat output:
Code:
tcp        0      0 localhost.localdo:mysql *:*                     LISTEN      26163/mysqld


Firewall output:
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
fail2ban-ssh  tcp  --  anywhere             anywhere            multiport dports ssh

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain fail2ban-ssh (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

I read out about commenting the bind line. I did it. I restarted the mysql server (after creating a new password for the root user).

With that, the currenlty nestat result is:
Code:
tcp        0      0 *:mysql                 *:*                     LISTEN  31153/mysqld
The comand "cat php.ini | grep sql.safe.mode" results:
Code:
sql.safe_mode = Off

But I'm still getting an error when I try to access to the test.php:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'XXXX'@'XXXX.com' (using password: YES) in /X/test.php on line 10
Access denied for user 'XXXX'@'XXXX.com' (using password: YES)

I use the correct user/password.
Is that messages only a credentials error or a misconfiguration of the mysql/web server?

Last edited by liloman; 29th June 2011 at 12:13. Reason: Forgot code
Reply With Quote
  #5  
Old 29th June 2011, 14:40
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,070
Thanks: 826
Thanked 5,396 Times in 4,240 Posts
 
Default

Try to use the IP address to connect to the server instead of using the hostname.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
connection, database, ispconfig, mysql, remote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Version 1.3 of the ISPConfig 3 Manual is finally available! falko General 44 2nd December 2011 12:04
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
SquirrelMail login not working glenneh Installation/Configuration 13 9th April 2011 20:01
Hosting multiple websites and webmail dmwcool Installation/Configuration 8 30th March 2010 03:15
MySQL problem satimis Server Operation 5 25th June 2008 15:41


All times are GMT +2. The time now is 22:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.