[mythtv-users] Upgrade to 2.6.17-gentoo-r2/ivtv-0.7.0/mythtv-0.19_p9163-r1 and having problems

John Johnson johnatl at mac.com
Sun Jul 16 23:15:42 UTC 2006


Mark Knecht wrote:
> On 7/16/06, John Johnson <johnatl at mac.com> wrote:
>   
>> If your server is in your /etc/hosts (or otherwise defined):
>> mysql -uroot -ppassword -hserver mythconverg
>>
>> If not, use its numeric IP address:
>> mysql -uroot -h192.168.0.100 mythconverg
>>     
> Yes, I've tried them both. Unable to connect:
>
> mark at dragonfly ~ $ mysql -u mythtv -h 192.168.1.55 mythconverg
> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.55' (111)
> mark at dragonfly ~ $ mysql -u mythtv -h 192.168.1.55 -p mythconverg
> Enter password:
> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.55' (111)
>   

Have you checked to see if the port is open to you? You can use telnet 
or nmap. I prefer nmap because it gives you a picture of all ports:

Using telnet:
dell ~ 16:56 john $ telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
A
4.1.19-standard-log-*).IeC[#,837Z at o1B:9Qm
( I press Enter )
Connection closed by foreign host.
dell ~ 16:56 john $

or the preferred nmap:

dell ~ 16:57 john $ nmap 10.11.10.199

Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2006-07-16 16:57 EDT
Interesting ports on dell.johnjohnson.info (10.11.10.199):
(The 1641 ports scanned but not shown below are in state: closed)
PORT      STATE SERVICE
22/tcp    open  ssh
25/tcp    open  smtp
80/tcp    open  http
...
3306/tcp  open  mysql
6543/tcp  open  mythtv
6544/tcp  open  mythtv
10000/tcp open  snet-sensor-mgmt

Nmap run completed -- 1 IP address (1 host up) scanned in 0.243 seconds
dell ~ 16:57 john $

Of course you're looking for 3306, the mysql port.

If you don't see it in the list, either MySQL isn't listening, or a 
firewall (iptables, ipchains) is blocking traffic to that port. Try 
running nmap on localhost from the MySQL server too.

Something else to check. If you can log into the machine with MySQL 
running on it:
mysql -uroot -h127.0.0.1 mythconverg
Perhaps MySQL is listening on the localhost, but not the network interface.

If you can get through on 127.0.0.1, try turning off any firewall you 
have set up. You might want to disconnect from the internet if your 
machine would be visible. If you're using iptables, try this:
sudo /sbin/iptables -L | less
and look for mysql and 3306. To effectively turn the firewall off, do this:
sudo /sbin/iptables -F
That will flush all the rules. Now do the list (-L) command shown above. 
All the policies should be ACCEPT now. If not, you can do this:
sudo /sbin/iptables INPUT ACCEPT
sudo /sbin/iptables OUTPUT ACCEPT
sudo /sbin/iptables FORWARD ACCEPT

As I said before, that leaves everything wide open, so you can reboot or 
(maybe on gentoo):
sudo /etc/rc.d/init.d/iptables restart

I highly recommend you install Webmin on your system. It has modules for 
MySQL just about anything you might want to set up.
http://www.webmin.com/

Using it's MySQL module, you can easily setup and check permissions such 
as which hosts can connect, which users, etc. It is a great tool for 
administering any UNIX like system.

Let me know how it goes!

Regards,
  JJ



More information about the mythtv-users mailing list