Ubuntu Networking :: Cannot Connect To MySQL (3306 Port)?
Jan 14, 2010
How do I get mysql 3306 port to be seen on my network?
Here is my setup:
---Desttop - WIndows Vista Ultimate (192.168.0.101)
--------VBox
------------Guest - Ubuntu 9.10 (Joomla CMS Development) (192.168.56.106)
---Server - Ubuntu 9.10 (192.168.0.100)
--------VBox
------------Guest - Ubuntu 9.10 (Joomla Production) (192.168.56.104)
------------Guest - Ubuntu 9.10 (MySql Database) (192.168.56.105)
I can ping all OS from any OS, I can connect to a shares, I can connect to the web server. I can do a netscan and display the open ports and the services for those ports except for MySql. How do get MySql to showup, so I can connect to it from my Joomla CMS? I came from openSuse and I like how they have modules to do this automatically. What do I use with Ubuntu to get the same results?
I've been working and researching this for about a week now and I still haven't had any luck. Basically, I have been trying to open port 3306 to allow connections to my MySql server.
i've added the rule into iptables, saved and restarted that i've added the rule into my router. and I have removed "skip-networking" from the my.cnf file and added the blind address in, I'm trying to get this all to work on my LAN, but it doesn't seem to work, I've also restarted the entire server and then port scanned it from outside and inside the networking and it still tells me that 3306 is closed.
I did however i had some luck when I entered the Ip of the machine that would be sending data to the server but then PROFTPD stopped working and the port was open :/ im not really sure what ip should be in there but another thread from another forum said to enter the ip of the machine that mysql is installed on. so currently its 192.168.0.2 which is the static internal address of the server.
every machine on the network has a static ip and all the rules have been added to each firewall, i.e. server and router firewalls.
ill pop my "my.cnf" under this to see if anyone can find a mistake,
Code: # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
Everything default.Everything works nicely with one exception. I can't connect to MySQL from the network.nmapping localhost tells me 3306 is open but nmap from the outside shows only ports 22 and 111 open. To my knowledge I have no firewall, iptables -L gives an empty set.I have several similar installations on the same network without any problems of this nature.
I'm new to linux, and setting up the mysql database server.
Here are my situation:
OS: CentOS 6 mysql version: 5.5
I tried to use MySQL Administrator to connect to my database on the host 192.168.1.120 and my computer is under the same network with ip: 192.168.1.105
But it shows the error msg: Could not connect to MySQL instance at 192.168.1.120
Error: Can't connect to MySQL server on '192.168.1.120'(61)(code 2003)
On the server side I've tried:
Code:
skip_networking is off and I've set the port for it.
When I check the process in OS:
Code:
When I try netstat:
Code:
I thought it's the problem of firewall, so I have check it also:
Im having a frustrating issue with my two machine cluster I setup using Conga. Everything was working great except now when lucci starts mysql the port (3306) is never opened to outside machines. I can do a "ps -ef | grep mysql" and see it running as well as login to mysql on the node it is running on - but an nmap of the machine does not show the 3306 port and I cannot login to mysql remotely and yes I turned off all iptables(iptables,ip6tables) and SElinux is disabled.What am I missing here? If I start mysql on my own (and it is using the same my.cnf as lucci is) it does show the port open and works perfect,t for some reason when lucci starts it, no dice
I'd love a hint or two on the following problem. I've set up iptables rules to forward all connections to port 3306 to a non-standard mysql port on a remote server. This works, except that I need to deal with the loopback interface in a special way and I'm stuck.
Code: iptables -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to 128.XXX.XXX.XXX:3197 iptables -A FORWARD -p tcp -d 128.XXX.XXX.XXX --dport 3197 -j ACCEPT iptables -t nat -A POSTROUTING -j MASQUERADE Since locally-generated packets will never hit the PREROUTING rule, you'll need to setup a near identical rule using OUTPUT to make it work. Here is what I've tried:
How do I check port 3306 to see if it is being used? I am unable to get MySQL to run with a LAMPP 1.7.3a installedon Ubuntu 9.10. The Apache server and ProFTPD start fine.
Right now I have a machine set up running Fedora. I have configured inittab to accept Console Logins, but I am having problems getting my netbook running PuTTY to connect. How would I go about finding the Host Name and Port to connect to?
I think this goes here, but I'm not sure. I decided that XAMPP had been troublesome enough. MySQL never worked. So I decided to instal the LAMP stack offered by YaST. I went about installing it thinking that it would all work. But it seems that I was wrong. So I try to start mysql, and here's what I get:
Code: the-matrix:~ # mysql start ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) or Code: the-matrix:~ # rcmysql start Starting service MySQL warning: /var/mysql/mysql.sock didn't appear within 30 seconds chmod: cannot access `/var/run/mysql/mysqld.pid': No such file or directory
i am using liferay5.2(mysql included in the download pack) on fedora. while liferay is working fine but i cannot connect to mysql.i am getting the error
[ [root@localhost ~]# ln -s /var/lib/mysql/mysql.sock /tmp [root@localhost ~]# /etc/init.d/mysqld start Timeout error occurred trying to start MySQL Daemon.
[code]....
i didnt find the mysql.sock file in the location /var/lib/mysql/mysql.sock. i cannot find the portal-ext.properties file also to make intial settings.
My problem is that for some reason I can't connect to my MySQL on my server.I know it's not the script, other than the information that I'm using to connect.The MySQL server is set to "localhost" so I set the host in my php script to "localhost".I check for the username and they say I should try "root" so I set the username to "root".Then I put in my root password.When I go to where my php script actually starts, it gives me the error saying that I cannot connect. I know the rest of the script works and the error refers to the info I'm using to go in
I've setup a CentOS apache web server, and loaded a site onto it. The site previously was functioning under windows xp (before I "stepped in") and wamp. What I did was copy the site in /var/www, reconfigure the httpd.conf (DocumentRoot /var/www/site, etc). Although when I try to open the webpage I get this error: Database Error: Unable to connect to the database:The MySQL adapter "mysql" is not available.
I would like to connect my pc to the TV but the vga cable is not compatible with my analog Tv.The pc that i'm using is equipped with everything, except it hasn't got an agp port for my TV-OUT video card.I have a second motherboard with cpu(+power source) on it, but it's too slow so i don't want to use it.So! My idea is to connect the pc to the second motherboard, and use the second motherboard just for the agp and the TV-out video card.(i really don't have no money for signal converters and new video cards at all)
I can't seem to establish a conncction to my site (that I'm hosting in the same computer as the gFTP client- running Lucid Lynx desktop as a server). My site is 'out there', with a domain etc. and also I work on it with localhost. I wanted to use ftp as Joomla has a 'ftp layer' for files permissions etc. But it keeps saying that I can't connect, or the connection 'was reset by a peer' whatever that means. For 'hostname' I use site.com (site is my site's name) and even tried the whole thing like http://www.site.com (I clicke on 'connect to remote, and enter that in the url). or just put it where 'host' goes (when I'm not using localhost) For user name and pass, I just enter what I usually put to access the administrator's back panel in joomla, but maybe I am supposed to use what I use to log on to ubuntu when I start my computer? note sure. Anyway I used a telnet command in the terminal and found that port 21 was blocked. MY isp says they don't block any ports so I don't know. I was able to do this last year so I don't know what is so hard about this lol In the router, I have 'ftp 21 to 21 and ip address 192.168.1.100 (ip is the same for http which is working as I have my site up) now it seems to be open as I used a command at the terminal (found from google). It's open but my ftp still can't connect to my server either localhost or to my site. there is no firewall blocking it and I think my router is set right.
Wow, don't know why I seem to have so much trouble with this ftp stuff. I have so start all over a few times, reinstalling Lucid Lynx destop all over, and adding the needed files to make it a server. I am just trying to do something simple for now- just having a localhost server environment to develop my joomla website, and later on host it from my server 'out there' (I already have a domain name and dynDNS service with nameservers etc. but don't want to do that yet, as I have in the past with my router forwarding port 80, and actually got hacked! so I don't want to do that again until I learn more about security) My problem right now is that I can't even get the localhost ftp to 'connect to the server'. i know the host name (localhost) and username/password that I set when I set up Lucid Lynx, and I'm sure that is what I use for the ftp usernamepassword, host etc. And I put port 21 for the port. I see from 'Shields Up' that my port 21 is closed. So I followed advice on a thread and entered a few commands in the terminal to ad iptables etc. But still, port 21 is closed and I can't install components with the Joomla installer in admin's backend. And I can't use fireftp to even change permissions in my local folders. What do i do next, open port 21 somehow? I saw a terminal command about opening port 21 that was simple but I forget it.
I have setup an OpenVPN server on my server box, it had been working perfectly until today. It operates on port 1194 which I am now unable to connect to (tried telnet). I have checked all the firewall rules and they still allow the port and I have also checked to ensure that OpenVPN is still listening to the port, which it's not but I have tried restarting the service and the box which dosent make any difference. The only thing that has changed is that yesterday I installed Openfire, could this have broken something?
I'm using mysql server through tcp/ip with no problem. But I don't know since when I'm not able to connect through socket. There are lots of topics but my bad I couldn't find one works for me.
OS: Ubuntu 9.04 mysql 5.0.75-0ubuntu10.5
my.cnf
Quote:
[mysqld] user = mysql socket = /var/run/mysqld/mysqld.sock skip-name-resolve safe-show-database code....
/var/run/mysqld/mysqld.sock socket exists and has chmod 777 Error:
Code: ERROR 2002 (HY000): Can't connect to local MySQL server through socket 'localhost' (2)
I have a Windows machine on which NX Client has been installed. I wanted to test if I could access my Ubuntu box. The Ubuntu Box has NX Server, Node and Client installed. When I try to log in from the Windows machine using NX Client with my Ubuntu username and password I get an error connection refused.
The following service is running: OpenBSD Secure Shell server sshd How can I resolve the issue?
I have installed ubuntu 11.04 and I'm now trying to connect to existing SUSE servers on the LAN. My home directory has a shared NFS mounted home on the SUSE servers while my home on the ubuntu machine is local. I can log in using ssh to all the SUSE servers except one. I get:
ssh: connect to host srv3 port 22: Connection refused
If I use the IP address of srv3 directly it works. Also, before I changed the default machine name ("ubuntu") I could log into srv3.
nslookup srv3 works OK. ping srv3 works OK.
Even if I completely delete the .ssh directory in both my ubuntu home and in my shared home on the SUSE servers I still cannot log in using the srv3 name, only direct IP address works. I'm thinking that the login I did to srv3 before I changed the machine name for the ububtu machine must have goofed up something
I assume that *:* means that any foreign host can connect from any port, but then what does [::]:* mean? and localhost:ipp... what port is ipp? Shouldn't ports be numeric?
I cannot use GRsync from Ubuntu Desktop to PCLinuxOS laptop.The 2 computers can ping each other. I have disabled both firewalls. My laptop IP address is 192.168.1.11This is the error on Ubuntu Grsync:
ssh: connect to host 192.168.1.11 port 22: Connection refused rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7] Rsync process exit status: 12
On PCLinuxOS it wont say Ethernet is connected when trying a static address setup.However it does connect to the internet via auto Ethernet setup and a LAN cable. It then says connected. In order to use SSH and GRsync what programs are required? I have these installed on both machines: grsync openssh-client openssh-server
I have a customer who is complaining that they can connect to prt y on IP x with telnet. They are seeing the following:
telnet x.x.x.x y Trying x.x.x.x... Connected to x.x.x.x. Escape character is '^]'.
after some time the connection of course times out. Connection closed by foreign host. There is no telnet service running on this port so they cannot do anything, but they are complaining tht the fact that telnet "connects" is a security risk. I am having difficulty explaining why they are able to connect with telnet. I know it has to do with the socket layer API in Linux but I am having difficulty explaining this sufficiently. I also can't just say "this is the way linux works" to them. I am looking through "UNIX Network Programming" by W.
I'm having problems connecting to the mysql database on my system. I first noticed this when I was trying to set up the program anymeal. I subsequently tried using MySQL Administrator (mysql-admin), but had no luck. It gives my the following feedback:
Code:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Click the 'Ping' button to see if there is a networking problem. I press the ping button, and it seems to connect.
I've downloaded and installed MySQL-client-5.1.53-1.glibc23.x86_64.rpm. I'm rather new to linux so it might be I haven't started the server. Unfortunately I have no idea which file is responsible for that. It is also possible that my head isn't functioning correctly ( if at all ).
Error I receive is:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I've been attempting to set up a LAMP for local web development, which meant installing mysql-server. But now have a problem when trying to run mysql, I get:-
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
When trying to downgrade mysql-server I saw that there are dependency problems between the various modules (but can't recall which). But whichever route I truied the results are always the same.
Thought about trying XAMPP but I note that even has it's problems, is there any way I can get a lamp set up on FC14, or must I give it up as a bad job.
Howver, just been trying to again to fix the problems with downgrading mysql and get:-
I have my desktop computer (running F13) configured to accept ssh over port 22 via the firewall configuration tool. If I type ifconfig -a, this computer, which is running on my wireless network, tells me:
However, if I go to my laptop computer (also running F13) and try and ssh into the desktop, i.e. ssh icthy@192.168.1.100, I get this response:
Code:
ssh: connect to host 192.168.1.100 port 22: Connection refused.
I guess I am confused to what is blocking the connection? Is there another means on F13 other than the default Firewall? I haven't really messed with the network at all. For what it's worth, I am hoping to set things up so I can just ssh into the computer name, (ssh icthy@desktop) eventually, but want to start with the IP. So, can anyone offer a hint as to what I can look for that is blocking port 22?
I have an x application I am trying to run under gnome. It assumes a fixed ip address and exclusive use of the eth0. I have run it under gnome on RHEL 5.3. I set the ip address and ifconfig confirms the correct address. When I run it I get "SocketConnect() error:
Resource temporarily unavailabele, port 8005. (on the terminal that I started it)
This is indicative that it has failed to make a connection to the outside world. One difference I notice between the non-working and the working is that, the error message seems to stop coming out on the fedora gnome, almost immediately, whereas on the other installations it will come out indefinitely until it connects. is virb0 interferring. What is different in the networking on fedora 11 then RHEL?