Frequently Asked Questions

The NearlyFreeSpeech.NET FAQ (*)

MySQL (*)

Q. Why shouldn't I use my MySQL admin username from my web site?

When setting up your site's MySQL connection information, it's tempting to skip the step of creating an additional user and just use the "admin" username (your member login name) and password. Never do that!

The first and most important reason not to do this is security. If your MySQL admin username's password is the same as your member password, you are storing your member password in plain text as part of your publicly-accessible web site. The slightest vulnerability in your application, the web server software, or the operating system could result in a compromise of your entire membership. Since that's a compromise of our system, we take a dim view of this and to protect ourselves, we tend to suspend sites if we discover the member password being stored in plaintext.

Even if you change your MySQL admin password, it's still not safe to use from your site. Your web site doesn't need administrator privileges against your database. It needs some subset of that, and creating a dedicated MySQL user for your site with only the necessary privileges is a good way to limit exposure to SQL injection attacks and other security issues.

Second, your admin username has the SUPER privilege. MySQL only allows a certain number of connections at a time. If it runs out, either due to a problem with your application or a glitch in the MySQL process itself, your site will start getting "too many connections" errors. However, in order to make sure you can get in and fix it, MySQL always holds a single connection aside for a user with the SUPER privilege. If your site is using your admin username, you'll be unable to resolve the issue yourself because that "rescue" connection will already have been wasted by the site. If you find yourself in that situation, you'll have to open a support issue and ask us to manually restart the process.

Note: If you have a subscription membership, you can request that we log in and manually restart your process. The protective measures described above are designed to ensure that it is never necessary. If you bypass all the protections, you can still wind up in this situation.

So remember, using your MySQL admin username from your site is a terrible idea. It seems easy and harmless up front, but sooner or later you will wind up regretting it.