Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok so after looking at the mysql site it looks like you need to specify two cnf files. like my1.cnf and my2.cnf. Then under your etc rc locate the mysql startup file and change the my.cnf file that is loaded. Now each mysql file will need to have different ports , sockets, pid-files, and shared memory base names.
That's just my problem though.. in the file /etc/rc.d/init.d/mysql there's no mention of the file my.cnf file anywhere..
the /etc/init.d and /etc/rc.d/init.d mysql is the binary. You actully want to look in inittab and find out your systems default runtime. Then find the file that has and S99 or K99 or something to that effect. That will be the loading script that contains the call to load mysql with the specified my.cnf file. what distro are you using for this?
Ok I think I did get a little confusing on my last post. In short what you are actually looking at is the binary file. Not the script that calls the binary. Also the binary will look for the default my.cnf file. As far as I know. So what you will want is a script that calls the mysqld binary and uses a parameter that specifies which my.cnf file to use.
Can you post what distro you are using? That way I can tell how bootup scripts are called. Also check for things like /etc/rc2.d or /etc/rc.d/rc2 or 3. Under those directories try looking for a mysql script in there. That is what should be specifing what .cnf file is being called.
Ok so further digging led me to here. http://dev.mysql.com/doc/refman/4.1/...qld-multi.html It looks like you will still use the same my.cnf file but specify the multiple instances in your my.cnf file. IE
[mysql0] at the bottom of the page there looks like a good example of a my.cnf file for reference. Hope this clears up a little bit.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.