Question

My previous install of MySQL on OS X was done manually with the native package installer.

Someone was helping me with an issue I had with upgrading some gems, and in process they installed mysql from the homebrew tools.

Since that point, I'm unable to access any of my local databases from MySQLWorkbench or from my various rails apps, but logging in with mysql on CLI using the same credentials allows me to read and write to all tables as normal.

The error I'm receiving from rails when I try to load a page is:

Mysql2::Error: Can't read dir of './r4/' (errno: 13): SHOW TABLES LIKE 'schema_migrations'

Any ideas as to what I can do to fix that?

Was it helpful?

Solution

Found the issue - permissions had changed on the /usr/local/mysql/data folder, I had to run:

cd /usr/local/mysql/data

sudo chown -R _mysql mysql*

* Note: Replace mysql* with the directory/directories causing the error. *

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top