Ubuntu: start/stop mysqld

If you use the init.d script on Ubuntu, e.g. 

sudo /etc/init.d/mysql restart

you may get this message:

Rather than invoking init scripts through /etc/init.d, use the service(8)

utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an

Upstart job, you may also use the stop(8) and then start(8) utilities,

e.g. stop mysql ; start mysql. The restart(8) utility is also available.

mysql stop/waiting

mysql start/running, process 25974


sudo: How do you grant sudo access and other notes?

To grant sudo access to a user, use visudo



Why does #includedir start with a # when setting up a sudo environment?

Normally # would be used to create a comment. However, here they’re used to be more inline with C – i.e. to include files. E.g.


And in this directory an included file with:

<your username> ALL=(ALL) NOPASSWD:ALL

will mean you get sudo access.



  • your sudoers file may need to be 400 or 440
  • the format of the line are the details for access. i.e. which <user> <terminal> <users you want access as> <commands> so you might see this:
    • root ALL=(ALL) ALL
  • NOPASSWD: or NOPASSWD:<space> means don’t ask for a password





Category is implementing a method which will also be implemented by its primary class

For warnings like:

Category is implementing a method which will also be implemented by its primary class

override them, using:

#pragma clang diagnostic push

#pragma clang diagnostic ignored “-Wobjc-protocol-method-implementation”

// do your override

#pragma clang diagnostic pop


Xcode: Crashlytics file not found

Recently I opened a project I had compiled and submitted to Apple.

I hadn’t touched it for a couple of months but I got this odd compile error in one of my files at:

#import <Crashlytics/Crashlytics.h>

The error read:

‘Crashlytics/Crashlytics.h’ file not found

Clearly the framework couldn’t be found but what puzzled me was why, when the project was working a few months ago, it suddenly stopped.

My platform:

Xcode: 4.6.3 

Mac OS X: 10.8.4

Amazingly, doing a search for this turns up pretty much zero.

Also, doing a search for “install crashlytics” again turns up nothing.

Doing a search on the Crashlytics website for the word “install” also turns up nothing.

Because I’d logged in, when I went to www.crashlytics.com it redirected me to the dashboard of the last app I was working on. And I didn’t see any install instructions there.

The Crashlytics knowledge base had nothing.