J Cornelius

On mysql

Updating Random MySQL Data — April 7, 2006

Contest winners are supposed to be random, pulled from a hat so to speak. The process of doing that is a little less obvious when that hat is a MySQL database with 500,000 people in it. You can't just stick your hand in and grab the first peice of paper you feel. Wait.... actually you can. So I needed to select a random group of people from this MySQL table. It's super easy to... continue »

Website and MySQL Monitoring — March 15, 2006

siteWatcher is an easy way to check if your Websites and MySQL databases are up and running. It runs on a schedule you set and simply checks your websites for content you specify and notifies you by email if that content is not found. You can also use it to check connectivity to MySQL databases. To setup siteWatcher all you need to do is download the PHP file, put it on your server... continue »

Check and Restart MySQL with a Cron — August 9, 2004

If you have a MySQL powered website it is critical that the MySQL Server is running. This little diddy will check to see that the MySQL Server is running and restart it if it's not.You will need to add an entry to your crontab that runs on a interval you are comfortable with. This example runs every minute although you can set it to run as often as you like. The command is very low on system... continue »

Change MySQL root password — June 5, 2004

This is the 'hands-on' way of changing the root password for your MySQL server. Get to a command prompt on the MySQL server and enter the following commands: mysql -u root mysql > UPDATE user SET password=password('secret') WHERE user='root'; > flush privileges; This should reset the password for you and then you can log in and get some real work done. continue »