How to Upgrade to a Non-Existent MySQL Version

Posted by Nessa | Posted in ,,, | Posted on November 28, 2007

15

Working in webhosting for a while now I’ve had some people ask for really weird shit, and I’ve dealt with a lot of people who try to sound a lot smarter than they actually are (I’m one of them). The latest of the bunch is a guy who asked for MySQL 7.0 claiming that he’s a MySQL programmer and that he specially programmed his database to work with MySQL 7.0. He really didn’t take it to heart very well when I told him that there is no MySQL 7.0 and the most he can hope for is 6.0x alpha (FYI for future readers a year from now, read the damn date on this post). Besides the point, the guy apparently felt like I was talking down to him so he went out of his way to mention that because he has a bachelors degree in computer science and that he’s an avid Microsoft Word user, he definately knows more than I do when it comes to doing my job. So, I gave in and agreed to upgrade him to MySQL 7.0.

The trick of the trade here is that you can essentially install any version of MySQL that you want to, whether it exists or not! It’s a long-standing suck point in cPanel that the MySQL version in user cPanels are read from a static file within the datastore directory:

/home/username/.cpanel/datastore/_usr_sbin_mysqld_–version

Within that file is the output of the ‘/usr/sbin/mysqld –version‘ command, which cPanel reads and outputs to each user’s cPanel. You can easily edit this file in one user’s account to make it read whatever MySQL version you want:

Needless to say, after I ‘upgraded’ his version to 7.0, he claims his scripts started working!

Share and Enjoy:
  • Digg
  • DZone
  • del.icio.us
  • Technorati
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Twitter
  • Sphinn
  • Mixx
  • blogmarks
  • Furl
  • Reddit
  • Slashdot
  • RSS

Related posts:

  1. Upgrading to MySQL 5.1.x on cPanel
  2. Installing Sphinx for MySQL 5.1
  3. Using PHP to Display Version Info
  4. How to Upgrade PHP
  5. Messing with PHP and MySQL

Comments (15)

Great I cant wait for the System Admin call that I will have to take form this guy at some point….

I knew it…that’s why I gave him your direct extension….

if I hadn’t carpet bombed cPanel off of my own VE, I’d be running MySQL v37.0 right now.

go figure that you would do something like that … ya big jerk :P

I am a little curious though, does cpanel have any non-suck points?

Sure it has a ton if you dont know anything about the internet and use Frontpage to make your site then its everything and then some ;) but if you are the exact opposite of that then ummm yeah I dont think I need to explain any more on that.

Hence why I got rid of mine ;P

You’re right though, most of our cpanel customers over here are computards…

I used to think that but the new cpanel 11 really has its shit down and fewer suck points than it used to. The only reason why I’m fond of it is because it makes it easier to do some of the shit that i’d otherwise have to do manually. I think it’s really only good for running shared hosting servers and such – dedicated and VPS’s with advanced users should do away with it because it tends to be a software nazi

An interesting addendum to the mysql 7 thing:

http://bugs.mysql.com/bug.php?id=2337

THIS IS AWESOME! I’ve never had to deal with one of these clients, but this would be a fun trick if I ever did.

hi.. hi The easy way to upgrade mysql

I read your mention about MySQL 7 from Twitter, and didn’t think it’d be funny

Until you wrote about how you ‘fixed’ the problem– i thought it’d be, “Duh, stupid customers” but.. LOL.

GIVE THE CUSTOMERS WHAT THEY WANT! Completely grin-worthy. kudos. XD

/home/username/.cpanel/ is a cache directory. You can remove this directory and it will be rebuilt the next time the user logs in to cPanel (or by refreshing the interface if already logged in).

I wonder if your user noticed that the MySQL version changed when the cache was refreshed?

Yea, he noticed a few days later when he had one of those “hey, wait a minute” moments…after he already told me that the upgrade fixed his problem. I bet he feels smart =)

[...] Between 1-wee hours of the night Mon-Fri I’m at work listening to screaming two-year-olds otherwise known as “servers”, and racking the last two brain cells I have left on programming and troubleshooting the oddities that come along with the people that want to be difficult [...]

Post a comment