Training, Open Source computer languages

This is page http://www.wellho.net/forum/The-MySQ ... abase/Tcp-port-v-named-socket-Multiple-mysqld-servers.html

Our email: info@wellho.net • Phone: 01144 1225 708225

 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
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.

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho