Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Python, Lua and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Java, C, C++, Ruby, MySQL and Linux / Tomcat systems
Tcp port v named socket / Multiple mysqld servers

Posted by admin (Graham Ellis), 17 October 2002
You can connect to your mysqld via a named socket, or via a TCP port; mysqld supports and expects connections from either.  The named socket, which is a local file on the file system of the server running mysqld, is a little more efficient in terms of the resources it uses, but limits connections to local clients (quite simply because the file cannot be seen from elsewhere ... I wouldn't want to try it using NFS or SMB).  The TCP port allows connections to be made from other systems via your TCP/IP network.

If you're running multiple mysqld servers on the same host (and before you do this, ask yourself if you really MUST - better to have one daemon handling a number of databases), you should ensure that each has a unique socket and each has a unique port number.  It's dangerous to have several mysqld daemons accessing the same set of databases and tables.  There's a script (in Perl) supplied with the mysql distribution called mysqld_multi which you can use to replace safe_mysqld and run a number of mysqld's all at the same time on the same system.  It uses the /etc/my.cnf file to collect a different set of configurartions for each daemon, so that starting and stopping them automatically is not quite so error prone as giving a long list of command line options

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2018: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: • WEB: • SKYPE: wellho