Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Connecting to Port 3306

Posted on 2004-04-10
10
Medium Priority
?
6,524 Views
Last Modified: 2013-11-22
I have MySQL setup on a FreeBSD system but cannot connect remotely to the MySQL server. It was suggested that I try to Telnet to port 3306 to see if there was any response, but doing this does not give a connection.

Any ideas where I can look to solve this problem.

Thanks in advance for any help

Richard.H
0
Comment
Question by:RICHARDH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 1

Accepted Solution

by:
fyerk earned 80 total points
ID: 10797380
Make sure the daemon is listening on 3306:
> sockstat -4l | grep 3306

If not, make sure the daemon is running.
> ps -U mysql

If the daemon isn't running, start it:
> /usr/local/etc/rc.d/mysql-server.sh

If you've already started it with the script, check /var/log/messages to see if there were any errors that prevented it from starting up.
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 80 total points
ID: 10798385
Maybe you run mysqld in AF_UNIX socket mode (aka secure mode) and it never opens AF_INET socket
0
 

Author Comment

by:RICHARDH
ID: 10800081
HI there,

How can I test if I have opened mysqld in Secure Mode. And if I have how can I make the change.

Thanks
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 62

Expert Comment

by:gheist
ID: 10800228
This is unsafe, so read TFM to find out all insecurity you want to open...
0
 
LVL 1

Assisted Solution

by:pixr99
pixr99 earned 80 total points
ID: 10814079
You may also want to check /etc/hosts.allow to make sure that tcp-wrappers isn't blocking access to the MySQL daemon.  If wrappers are turned on you'll probably have to add a line like this:

mysqld : my.ip.add.ress : allow

0
 
LVL 1

Assisted Solution

by:kolyakarpov
kolyakarpov earned 80 total points
ID: 10977789
There maybe firewall blocking access to port 3306.

Make shure there are only one rule like 65535 32580 14666937 allow ip from any to any
> ipfw show

If there are plenty of rules add the folowing rules before last rule (XXX is number of rule (1 column)):
> ipfw add XXX allow tcp from any to me 3306
> ipfw add XXX+1 allow tcp from me 3306 to any

0
 
LVL 18

Assisted Solution

by:John Gates, CISSP
John Gates, CISSP earned 80 total points
ID: 11152956
You may also want to check and see if your user has access from any host or just localhost.  If you are getting access denied errors, that is where I would start.

D
0
 
LVL 4

Expert Comment

by:frankcheong
ID: 11185306
After all, you missed the MySQL security.

On the mysql server type the following :-

mysql -u root

use mysql;
insert into user (host, user, passwd, Select_priv , Insert_priv, Update_priv,  Delete_priv,  Create_priv,  Drop_priv) values ('ip', 'user', password('passwd'), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');

quit


Replace the 'user' with the user name 'passwd' with the password of the user, 'ip', with the ip address of the client pc which need to connect to mysql and 'Y' to 'N' when appropriate for each of the rights that you allow the client to do.


0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question