Month: January 2014

Remote MySQL Connection Access

When moving a site from one server/host to another it’s often necessary to have both servers/hosts share a third server’s database. This is necessary because as the DNS change propagates around the world some user’s ISP may send them to your old server and some may arrive at the new server.

If you had two independent servers running two instances of MySQL the records in the database won’t match and some users will never be on the new server. This is especially a problem if you’re running a subscription based website. You merchant may have already processed their account information and confirmed them on your site, but wait, were they confirmed on the old server or the new one?

Using a shared database allows users who sign up to your site through the old server to be added same database as users who sign up through the new server. But MySQL doesn’t allow this to happen by default. It thinks that any incoming request from an outside connection is a security threat.

The internet is usually a great place to find tutorials, especially relating to programming. However, configuring a MySQL database for remote connections seems to be a poorly documented thing online.

With that in mind, here is a short explanation of how to configure MySQL to allow remote connections.

Note: this will not work on shared hosting.

Continue reading

Releasing Frontend Libraries Via Bower

For a long time I’ve had a CSS and JavaScript library that I’ve maintained for my personal and professional projects. The CSS included UI components, like buttons and switches, and the JavaScript were ports of all the PHP functions I had written so I have the same functions client side that I had server side.

Recently I released these libraries under the banner of a larger project, MogulMVC.

Since releasing them on GitHub I’ve been able to install them in any project by just running a git clone or git pull in my CSS or JS directory, and this makes it very easy to keep them updated, but it was still lacking something.

Continue reading