LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-23-2011, 04:29 AM   #1
Spetnik
Member
 
Registered: Mar 2004
Posts: 40

Rep: Reputation: 15
MySQL remote connections from Windows


Is there any special configuration to allow a remote Windows host to connect to MySQL on my Linux server? In my.cnf I have set the bind-address to the server's IP address.

However, when I run this from the Windows machine (works fine from another Linux machine):
mysql -h serveraddress -u user -p

I get the following error:

ERROR 2017 (HY000): Can't open named pipe to host: serveraddress pipe: mysql (1326)


Any help would be greatly appreciated.

Thanks!
 
Old 09-24-2011, 12:33 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Can you post your my.cnf file (changing IP addresses and other personal things of course)?

Kind regards,

Eric
 
1 members found this post helpful.
Old 09-24-2011, 03:56 AM   #3
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
your problem is known:
- here
- here
read the posts at the bottom of the screen from starting thread:
Quote:
Subject Written By Posted
error 2017: can't open named pipe to host david 04/04/2006 08:40PM
Re: error 2017: can't open named pipe to host Umesh Shastry 04/05/2006 05:42AM
Re: error 2017: can't open named pipe to host Brian Geasa 06/01/2006 12:32PM
Re: error 2017: can't open named pipe to host tikkytikky 01/22/2007 02:38PM
Re: error 2017: can't open named pipe to host edward 01/25/2007 11:23AM
Re: error 2017: can't open named pipe to host chariya punyanitya 01/13/2008 02:23PM
Reinstalling with standard config worked for me David Ashman 01/24/2008 03:44PM
Re: error 2017: can't open named pipe to host Kapil Bulsara 01/07/2008 06:09PM
Re: error 2017: can't open named pipe to host
 
Old 09-24-2011, 12:36 PM   #4
Spetnik
Member
 
Registered: Mar 2004
Posts: 40

Original Poster
Rep: Reputation: 15
My my.cnf is below. Lithos, I don't think those links are applicable here, as those are regarding Windows servers.

Code:
[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /var/lib/mysql
tmpdir      = /tmp
language    = /usr/share/mysql/english
skip-external-locking

bind-address       = www.xxx.yyy.zzz

key_buffer      = 16M
max_allowed_packet  = 16M
thread_stack        = 128K
thread_cache_size   = 8

myisam-recover      = BACKUP

query_cache_limit       = 1M
query_cache_size        = 16M

expire_logs_days    = 10
max_binlog_size         = 100M

skip-bdb

[mysqldump]
quick
quote-names
max_allowed_packet  = 16M

[mysql]

[isamchk]
key_buffer      = 16M

!includedir /etc/mysql/conf.d/

Last edited by Spetnik; 09-24-2011 at 05:45 PM.
 
Old 09-24-2011, 02:05 PM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Can you add the following to the mysqld section, restart the MySQL service and try again:
Code:
enable-named-pipe
I'm assuming you're running the MySQL client on Windows from the command prompt right?

Kind regards,

Eric
 
Old 09-24-2011, 05:46 PM   #6
Spetnik
Member
 
Registered: Mar 2004
Posts: 40

Original Poster
Rep: Reputation: 15
I tried that - no luck.
Yes, I am running it from a windows command prompt.
 
Old 09-24-2011, 05:56 PM   #7
Spetnik
Member
 
Registered: Mar 2004
Posts: 40

Original Poster
Rep: Reputation: 15
I just tried it with --protocol=tcp and it works. I guess that's okay - do named pipes work with a Linux server?
 
Old 09-25-2011, 02:45 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Have a look at this easy description and yes, named pipes also work in Linux although there are substantial differences.
http://en.wikipedia.org/wiki/Named_pipe. I find it strange that you get it working when you indicate to use TCP as protocol.

Kind regards,

Eric
 
Old 09-25-2011, 06:35 AM   #9
Spetnik
Member
 
Registered: Mar 2004
Posts: 40

Original Poster
Rep: Reputation: 15
Based on this, it does not seem like a named pipe connection from a windows client to a Linux server would be possible. Am I correct?
 
Old 09-25-2011, 06:52 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Normally it shouldn't be an issue referring to the MySQL server. You should be able to connect to MySQL server on Linux from Windows without problems. Can you stop the mysqld service and start it manually with:
Code:
/usr/sbin/mysqld --verbose
then try to connect from Windows to see what turns up. You could also enable logging if you haven't done that already and see if anything turns up in there.

Kind regards,

Eric
 
Old 09-25-2011, 08:05 AM   #11
Spetnik
Member
 
Registered: Mar 2004
Posts: 40

Original Poster
Rep: Reputation: 15
From my extensive research, it seems that it is not possible for a Windows client to connect to a Linux MySQL server via named pipes. Named pipes seem to be two very different protocols for Windows and Linux. It seems that TCP is the only way to do it.

Thanks for the help

Last edited by Spetnik; 09-25-2011 at 08:47 AM.
 
Old 09-25-2011, 08:45 AM   #12
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

It looks like you're right in that aspect. I've been searching too and came across this page from the MySQL reference manual:
http://dev.mysql.com/doc/refman/5.5/...to-server.html.

Kind regards,

Eric
 
  


Reply



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
Allow remote connections MySQL server Skillz Linux - Server 3 06-02-2009 11:34 PM
windows 2003 remote desktop- number of connections kpachopoulos General 3 10-25-2007 11:39 AM
MySQL + Debian + MySQLCC + Remote Connections, How? Mulsiphix Linux - Newbie 3 01-07-2006 04:46 PM
X and remote connections? jonsson Linux - Newbie 6 11-15-2004 12:25 AM
Remote connections dARkHunTEr Linux - Networking 7 08-03-2003 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:08 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration