Error: uninitialized constant MysqlCompat::MysqlRes

If you have tried all the above and it still didn't work, try the instructions on THIS page:

It worked for me! (Don't forget to use the "source" command or restart your terminal session after modifying your bash profile.)