-
Not connecting across a network to a Knoppix MySQL server
Running Knoppix 3.81 from CD, I've fired up MySQL and loaded a bunch of data via a USB drive. My Perl scripts work fabulously from LOCALHOST. Ping works to/from this computer so the NICs aren't the problem.
Problem:
I can't seem to connect to the MySQL server across my network. From a different machine (also running Knoppix 3.81 from CD), I type
mysql -h 192.168.1.1 -u username -ppassword
and get:
ERROR 2003: Can't connect to MySQL server on '192.168.1.1' (111)
I've moved and copied back /etc/hosts.allow and /etc/hosts.deny and added the following to /etc/hosts.allow and commented out everything in /etc/hosts.deny
mysql : 192.168.1.* : ALLOW
I tried a bunch of things in /etc/hosts.allow and resorted to:
ALL : ALL@ALL : ALLOW
And, yes, I started INETD since I wasn't sure whether or not I needed to.
Suggestions?
-
Problem solved and I'm posting the solution should someone find it helpful:
1) /etc/hosts.allow needs to be told to listen to MYSQL clients. The following three lines does that but change the IP accordingly:
sudo mv /etc/hosts.allow /etc/hosts.allow.bak
sudo cp /etc/hosts.allow.bak /etc/hosts.allow
sudo kwrite /etc/hosts.allow & # Add a line=>mysqld : ALL@192.168.1.* : ALLOW
2) Knoppix defaults to having MYSQLD ignore everything not from LOCALHOST. Comment out the "bind-address = 127.0.0.1" line of /etc/mysq/my.cnf. The following three lines does this.
sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
sudo cp /etc/mysql/my.cnf.bak /etc/mysql/my.cnf
sudo kwrite /etc/mysql/my.cnf &
3) Start (or stop and start) MYSQLD to read the new config file
sudo /etc/init.d/mysql start
4) Set MYSQLs root password
mysqladmin -u root password root
5) Connect to MYSQL as root
mysql -u root -proot
6) Delect anonymous users
delete from mysql.user where User="";
delete from mysql.db where User="";
7) Let root log in from anywhere. You probably don't want let ROOT do this but you can use it as a GO-BY for other users.
GRANT ALL ON *.* TO "root"@"%" IDENTIFIED BY "root" WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
-----
You should be able to go to another computer, and type
mysql -h 192.168.1.1 -u root -proot
and have it connect.
-
Junior Member
registered user
thanks for posting a solution. not many people seem to around here. i ran into this problem trying to set mythtv frontend access to the knoppix backend, but as your posts suggests, the hosts file has something to do with it. i'd assumed the same but wasn't sure how to change it.
commenting out the bind address and giving permissions to access from any host (%) hasn't worked so far so i'm going to try your suggestion as soon as my recording finishes. i'll post back to report whether or not its resolved my problem.
i assumed it may be a problem specific to knoppix as it is a live distro.
-
Junior Member
registered user
i took a look at my file /etc/hosts.allow - it contained the following which prevented connections from external hosts
ALL : ALL@ALL : DENY
commenting it out solved it for me. think this is specific to knoppix.
Similar Threads
-
By knopx4me in forum Customising & Remastering
Replies: 1
Last Post: 11-21-2008, 05:38 PM
-
By Magnus_L in forum Networking
Replies: 4
Last Post: 09-05-2008, 05:05 AM
-
By Aspra in forum Networking
Replies: 5
Last Post: 01-31-2006, 06:36 PM
-
By sange in forum Tips and Tricks
Replies: 0
Last Post: 11-06-2004, 05:56 PM
-
By Anssi in forum Networking
Replies: 2
Last Post: 04-29-2003, 06:38 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![New Precision DWDM SFP+ 10G 80km Tunable Transceiver 50GHz C-Temp DWDM-SFP10G-C picture](/store/img/g/tqEAAOSwkbxmR-l8/s-l225/New-Precision-DWDM-SFP-10G-80km-Tunable-Transceive.jpg)
New Precision DWDM SFP+ 10G 80km Tunable Transceiver 50GHz C-Temp DWDM-SFP10G-C
$90.00
![LOT OF 20 Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module picture](/store/img/g/JEEAAOSwzu9ibCFX/s-l225/LOT-OF-20-Genuine-Cisco-SFP-10G-SR-V03-10GBASE-SR-.jpg)
LOT OF 20 Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module
$95.00
![LOT OF 10 HPE JD092B X130 10G SFP+ LC SR Transceiver picture](/store/img/g/EMwAAOSwW05l1QTO/s-l225/LOT-OF-10-HPE-JD092B-X130-10G-SFP-LC-SR-Transceive.jpg)
LOT OF 10 HPE JD092B X130 10G SFP+ LC SR Transceiver
$40.00
![CISCO DS-SFP-FC64G-SW picture](/store/img/g/J-4AAOSwNptmfzD-/s-l225/CISCO-DS-SFP-FC64G-SW.jpg)
CISCO DS-SFP-FC64G-SW
$210.00
![🔥🔥🔥 CISCO SFP-10G-SR V03 10-2415-03 850nm 10GBASE-SR SFP+ Multi Module 🔥🔥🔥 picture](/store/img/g/KTkAAOSwcmBisISE/s-l225/-CISCO-SFP-10G-SR-V03-10-2415-03-850nm-10GBASE-SR-.jpg)
🔥🔥🔥 CISCO SFP-10G-SR V03 10-2415-03 850nm 10GBASE-SR SFP+ Multi Module 🔥🔥🔥
$6.80
![GENUINE Cisco SFP-10G-SR V03 SFP+ GBIC Transceiver Module 10-2415-03 picture](/store/img/g/tAkAAOSwdENkHItI/s-l225/GENUINE-Cisco-SFP-10G-SR-V03-SFP-GBIC-Transceiver-.jpg)
GENUINE Cisco SFP-10G-SR V03 SFP+ GBIC Transceiver Module 10-2415-03
$6.80
![Cisco DS-SFP-FC8G-LW 8gb Transceiver Modules (Lot of 6) picture](/store/img/g/-WIAAOSwnApmgDRN/s-l225/Cisco-DS-SFP-FC8G-LW-8gb-Transceiver-Modules-Lot-o.jpg)
Cisco DS-SFP-FC8G-LW 8gb Transceiver Modules (Lot of 6)
$10.00
![Brand New Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Module 1310nm 10km SMF LC picture](/store/img/g/aIgAAOSwXWNi1sm1/s-l225/Brand-New-Cisco-GLC-LH-SMD-1000BASE-LX-LH-SFP-Modu.jpg)
Brand New Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Module 1310nm 10km SMF LC
$12.99
![New Cisco SFP-10G-LRM 10G SFP+ LRM 1310nm 220m SMF/MMF LC Module picture](/store/img/g/Y-EAAOSw2pVl1CqO/s-l225/New-Cisco-SFP-10G-LRM-10G-SFP-LRM-1310nm-220m-SMF-.jpg)
New Cisco SFP-10G-LRM 10G SFP+ LRM 1310nm 220m SMF/MMF LC Module
$32.19
![For Cisco SFP-10G-T, Ubiquiti UF-RJ45-10G Transceiver, SFP+ to RJ45 10GBase-T picture](/store/img/g/H0kAAOSwYRJhQsEA/s-l225/For-Cisco-SFP-10G-T-Ubiquiti-UF-RJ45-10G-Transceiv.jpg)
For Cisco SFP-10G-T, Ubiquiti UF-RJ45-10G Transceiver, SFP+ to RJ45 10GBase-T
$44.99