LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-11-2011, 11:59 AM   #1
unkie888
Member
 
Registered: Aug 2007
Posts: 67

Rep: Reputation: 24
Thumbs up mysql remote access


I am posting this in case someone else has the same problem.

I was having a problem getting remote access to work for mysql.

I had created the remote user and I had setup iptables to allow 3306 connections from the other server.

But it still didn't work.

telnet on the mysql server I wanted to connect to, showed the port was listening on localhost, but the port was not listening externally.

telnet 127.0.0.1 3306 (listening)
telnet 111.222.333.444 3306 (not listening)

It appears that for remote access, mysqld looks in it's my.cnf file for the bind-address, for example bind-address=myServer.co.uk. Then it gets the external IP from /etc/hosts. /etc/hosts was mapping myServer.co.uk to 127.0.0.1

Changing /etc/hosts to map myServer.co.uk to 111.222.333.444 solved the problem.

Last edited by unkie888; 02-11-2011 at 12:01 PM.
 
Old 02-12-2011, 01:55 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Hi,

Thanks for sharing. Off the Zero Reply List.

Kind regards,

Eric
 
  


Reply

Tags
mysql, mysqld


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can access to mysql from remote,help!!! ajaxer Debian 2 06-30-2008 04:52 AM
Mysql remote access dereko Linux - Server 10 04-22-2008 08:46 PM
remote mysql access in slackware? Shioni Linux - Networking 8 11-29-2006 06:58 PM
Remote MySQL access gauge73 Linux - Software 2 03-05-2006 09:24 AM
MySQL 4.1 remote access james.reid Linux - Software 0 01-03-2006 06:55 AM


All times are GMT -5. The time now is 12:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration