MySQL Workbench "fetching..." -- cannot browse DB

The following command worked for me on windows:

C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql_upgrade.exe -u root -p --force

If the root password is not set, you might need to do this before you run the command above:

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('something');


The link above to mysql_upgrade did not solve my problem directly, but it did lead me to examine my mysql error file, which ultimately led me to the solution. I noticed several lines like this in the error file (located at [xampp root]/var/mysql/[dbname].err):

/Applications/XAMPP/xamppfiles/sbin/mysqld: Can't create/write to file 
    '/var/folders/y2/37h93r_931sdfpcr7vnc83380000gn/T/ibigNFFi' (Errcode: 13)

That led me to this page in the MySQL docs which states that you should explicitly set the temp folder for MySQL. I double-checked my config file ([xampp root]/etc/my.cnf) and saw this, which looked fine:

[mysqld]
tmpdir = /Applications/XAMPP/xamppfiles/temp/

However, looking back at the error log, I also noticed this:

Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored

Duh. The config file was getting ignored, so the configured temp folder was not getting used (I have no clue why the file was world-writeable...). I edited permissions on the my.cnf file which was 777 and simply removed the "Everyone|write" permission (now 775 / -rwxrwxr-x), reloaded everything, and now everything works.

Not a very intuitive symptom for the ultimate fix, so hopefully this helps someone else.

Tags:

Mysql

Macos

Xampp