Tuesday, November 22, 2011

Yii. Rbac. No such file or directory (trying to connect via unix:///var/mysql/mysql.sock

To resolve the error in the title of this post:

1. Set the following in "/etc/php.ini"

mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock

2. Comment out the following line in "/protected/config/main.php" of your app:


3. Restart Apache:

sudo apachectl restart


  1. Hi Mark,

    I could not find your e-mail so I am contacting you via comments, hope you don’t mind :-). I came across your blog when I was searching for awesome tech experts online and I love your tech stuff! You have excellent knowledge and is very informed thus I want to personally invite you to be one of the top Shopping Advisors on ShopSquad http://www.shopsquad.com/landing/bloggers/?vsrc=tech1122, a free shopping advice website where shoppers and your readers can ask Advisors (i.e. you!) for advice.

    If you recommend something that is purchased, you get a percentage of the sale. You're already sharing your expertise through your blog, so why not earn more money for it? You can also earn $5 for each of your readers who signs up.

    Read our great press http://www.shopsquad.com/about/?vsrc=tech1122 coverage or learn how ShopSquad works http://www.shopsquad.com/howitworks/?vsrc=tech1122. When you're ready, sign up free at www.shopsquad.com. http://www.shopsquad.com/?vsrc=tech1122

    Feel free to ask me any questions: marshall@shopsquad.com.


  2. Hi Mark, I'm Louis Tang, just dropped you a message via Facebook but guessed you haven't checked yours often. So feel free to check it or email me louis.keeper@gmail.com

    Hope to hear from you soon since i am gonna be there in Singapore on 4th of Dec. For the BlackBerry DevCon. Kinda need your help and should cheers a glass of beer as well.

    Hope you still remember me since it's been 10 years from the time i was your student. LOL

  3. There is definitely a lot you can do with Yii. Thanks Mark for providing this blog entry to answer a problem people run across. We've been working Zurmo, which might be one of the most complex projects on Yii to date. It's an open source CRM app written in PHP utilizing JQuery, Yii, and RedBeanPHP. It relies heavily on test driven development. Check it out at www.zurmo.org