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
 
20.9.2014 - We have just updated our course layouts and descriptions and added our 2015 schedule.

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 www.opentalk.org.uk 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., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho