Connect to remote mysql server from webserver

I have a mysql server and a webserver, both are on the same subnet.

I set up mysql to allow remote connections.  I am able to connect to it from the webserver on the command line using:

mysql -u snort -p -h

No problems.  But when I use the same information in the "base" utitlity for snort I get:

Database ERROR:Host '' is not allowed to connect to this MySQL server

Any ideas?
LVL 23
Who is Participating?
stu215Connect With a Mentor Systems AnalystCommented:
If your on a linux machine SELinux may be causing a problem with it...

Try setting it to permissive mode and then run it in your program:
( Run the following on the command line )
setenforce 0

To put it back:
setenforce 1

You might also try temporarily turning off the firewall running your command & then putting it back up to see if a port needed is blocked. ( You can narrow the port down after if this works )

I believe the default port is: 3306

You might also check the permissions on the user you are trying to connect to MySQL to see if it is allowed to remotely connect.

See Step 5 in the guide:

The following shows how to get what permissions a user currently has:
savoneAuthor Commented:
It was selinux on the webserver... Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.