#1  
Old 29th May 2006, 12:21
OnTheRun OnTheRun is offline
Member
 
Join Date: Nov 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default MySQL-Remote access

Hello all,
I'm trying to get the remote-access for mysql working.
I created a new database and set "Remote Access" to "Yes". But when I try to connect to that database with i.e. MySQL Administrator, I get the following error:

Quote:
MySQL Error Number 2003
Can't connect to MySQL server on 'mydomain.ch' (10061)
I then configured the port 3306 in the firewall of ispconfig, as well on our firewall. I then tried to connect from the server itself, on itself. That gave me the following result:

Code:
mysql -h www.mydomain.ch -p -P 3306
ERROR 2003: Can't connect to MySQL server on 'www.mydomain.ch' (111)
Has anyone a clue, what could be the problem?

Thank you and with kind regards
Reply With Quote
Sponsored Links
  #2  
Old 29th May 2006, 15:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

What's the output of
Code:
netstat -tap
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 30th May 2006, 08:58
OnTheRun OnTheRun is offline
Member
 
Join Date: Nov 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello falko,
thank you for your answer.
The output of netstat -tap is:
Code:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:8000                  *:*                     LISTEN     1137/icecast
tcp        0      0 *:imaps                 *:*                     LISTEN     835/couriertcpd
tcp        0      0 *:pop3s                 *:*                     LISTEN     858/couriertcpd
tcp        0      0 localhost:mysql         *:*                     LISTEN     21556/mysqld
tcp        0      0 *:pop3                  *:*                     LISTEN     844/couriertcpd
tcp        0      0 *:imap2                 *:*                     LISTEN     821/couriertcpd
tcp        0      0 *:www                   *:*                     LISTEN     22707/apache2
tcp        0      0 *:81                    *:*                     LISTEN     11887/ispconfig_htt
tcp        0      0 *:ftp                   *:*                     LISTEN     10578/proftpd: (acc
tcp        0      0 pptout-chsrv4.pa:domain *:*                     LISTEN     12380/named
tcp        0      0 localhost:domain        *:*                     LISTEN     12380/named
tcp        0      0 *:ssh                   *:*                     LISTEN     1078/sshd
tcp        0      0 *:smtp                  *:*                     LISTEN     10908/master
tcp        0      0 localhost:953           *:*                     LISTEN     12380/named
tcp        0      0 *:https                 *:*                     LISTEN     22707/apache2
tcp        0      0 server.domai:www router:10861         ESTABLISHED21046/apache2
tcp        0      0 server.domai:www router:10860         TIME_WAIT  -
tcp        0      0 server.domai:www router:10862         ESTABLISHED21043/apache2
tcp        0      0 server.domai:53873 klecker.debian.org:www  TIME_WAIT  -
tcp        0    148 server.domai:ssh 10.0.0.158:1255         ESTABLISHED21149/0
tcp        0      0 server.domai:8000 server.domai:48105 ESTABLISHED1137/icecast
tcp        0      1 server.domai:www 77.net116.adsl.ev:58519 LAST_ACK   -
tcp        0      0 server.domai:48105 server.domai:8000 ESTABLISHED29429/ices
With kind regards
Reply With Quote
  #4  
Old 30th May 2006, 15:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

MySQL is listening only on 127.0.0.1 and not on all interfaces:

Quote:
tcp 0 0 localhost:mysql *:* LISTEN 21556/mysqld
Change this in your my.cnf file and restart MySQL.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 30th May 2006, 17:47
OnTheRun OnTheRun is offline
Member
 
Join Date: Nov 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,
thank you for your answer
I commented bind-address now in my.cnf and netstat -tap looks like this:

Code:
tcp        0      0 *:mysql                 *:*                     LISTEN     32403/mysqld
The strange thing is, when I connect with:

Code:
mysql -h server.domain.local -P 3306 -p
I always get acces denied. This happens too, if I use the tld (i.e. www.domain.ch or domain.ch).

But when I use:

Code:
mysql -h 127.0.0.1 -P 3306 -p
it works like a charm. I used the same user and password (root) in both attempts.
Do you have any idea, what could be the problem?

Thank you and with kind regards
Reply With Quote
  #6  
Old 31st May 2006, 00:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

If you have a phpMyAdmin, go to the mysql database and there to the table users. Have a look at the Host column and see which hostnames are listed there. These are the hostnames you can use to connect.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 3rd July 2006, 02:04
tristanlee85 tristanlee85 is offline
Senior Member
 
Join Date: Apr 2006
Posts: 199
Thanks: 3
Thanked 2 Times in 2 Posts
Default

I'm in the same situation. I've looked at the tables and see where all the hostnames are set to localhost. I've got a domain plastikhosting.net that is hosted on a friend's server that is going to need to connect to my MySQL server on my domain plastikracing.net located on my ISPConfig server. Is there anyway to set plastikracing.net to accept both localhost and plastikhosting.net MySQL connections?
Reply With Quote
  #8  
Old 3rd July 2006, 09:27
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,400
Thanks: 834
Thanked 5,493 Times in 4,324 Posts
Default

You can add a new user in the mysql user table for the host plastikhosting.net or you chech the "Remote Access" Checkbox in the mysql settings in ISPConfig.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 3rd July 2006, 22:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
 
Default

And make sure your firewall doesn't block port 3306 and that MySQL is listening on all interfaces.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

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
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 16:05
configuring IPTABLES firewall adityavpratap HOWTO-Related Questions 9 27th May 2006 21:42
Questions in regards to ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" rbrantley HOWTO-Related Questions 16 10th April 2006 18:26
Remote access to ispconfig failure: fedora core 4 (64 bit) dchowdhu Installation/Configuration 6 27th January 2006 10:42
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04


All times are GMT +2. The time now is 14:25.


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