mysql quirks in mac os x

Over the past week or so, one of our mysql servers at work has been acting weird. It was running phpmyadmin, and appearing to be working fine, but my own scripts wouldn’t show the correct coulmns, even when using the php mysql function to get all the coulmns names. I was tearing my hair out trying to figure out wtf was going on, having no luck getting it to work with any of the methods that I knew of. This being a live server, we couldn’t just take it down and reboot the machine at any point in the regular work day; we’d have to do that at midnight or so. Yesterday we were talking about our backup plans if anything happened to this server, as it was acting decidedly weird, but agreed that we couldn’t do anything til the next day because I had ceramics class last night to go to. Sometime between 8:45am and 9:45am this morning, mysql decided that it had too many connections, and stop allowing any activity. I kill -9′d all the processes and sudo ./safe_mysqld’d it back into life, and voila, everything came back, and my scripts were pulling alllll the column names, and working correctly.

But why?

Bookmark and Share

Story pulse

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE 1=1 AND post_id = 256 GROUP BY hit_date' at line 5]
SELECT SUM(hit_count) AS hits, hit_date FROM WHERE 1=1 AND post_id = 256 GROUP BY hit_date


Leave a comment