MySQL Grants grant and revoke

Posted on Wed 18 August 2010 in misc • Tagged with mysql

I'm not really a fan of MySQL but here is a simple problem I always forget the syntax for which is really a SQL issue.

An installation of MediaWiki has an update script which requires the DROP privilege on the database, so I wanted to add the DROP privilege, run …


Continue reading

Formatting Output from MySQL prompt

Posted on Wed 23 September 2009 in misc • Tagged with mysql

I'm not the biggest fan of MySQL and on the occasions I do use it I always forgot how to get useful results from my queries. To get results paged to less and have them display vertically, you can do this

mysql> \P less
PAGER set to 'less'

mysql> select …

Continue reading

Restore Mysql Database from the .frm .MYI and .MYD files

Posted on Wed 23 September 2009 in misc • Tagged with mysql

OK so you have a mysql database that you have recovered from a backup. However, whereas you would normally have a nice sql dump to deal with, on this occasion you only have the .frm .MYI and .MYD files. Can you rescue that table the client has deleted? Indeed you …


Continue reading