Instruct a site to use MySQL socket for another site

I’m working on a multisite installation for another CMS, not Wordpress, and the way it works is that both sites’ folders sit in the same parent directory with the secondary site using the system folder and database for the primary site.

So the way I’ve got it set up currently was to create two sites in Local and then edit the site.conf.hbs file for the secondary site to use the public folder of the primary site. That works fine for static files, but for anything that connects to the database, I get a database connection error, because the database for the secondary site is empty, and I want it to use the db for the primary site.

I know that the way Local works is to assign a different MySQL socket for each site so I’m wondering if it’s possible to get the secondary site to use the socket for the primary site. I thought I might be able to edit my.conf.hbs and change the socket variable to the socket of my primary site, but that doesn’t work.

I can see in the my.cnf file for the secondary site in the /Users/tyssen/Library/Application Support/Local/run/ folder that the socket values are the same as the edited my.conf.hbs file, but the MySQL data directory is still pointing to the secondary site’s folder, not the primary. If I try editing that, as soon as I load the site in a browser, it switches back again.

Is there something else I need to do, or am I going about this the wrong way?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.