Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

mysql

macos

xampp

I've been having a lot of issues lately, basically since the last time I upgraded XAMPP for OSX (v1.7.3) and/or my MySQL GUI tools. Using MySQL Workbench (v5.2.44), I can connect to the DB running in XAMPP just fine, but trying to browse any database, under tables/views/etc it only shows "Fetching..." and never shows anything else. I can actually query tables, which is interesting, but I can't actually manage the databases in any meaningful way.

Googling, others reported having luck running mysql_upgrade on the command line, which ran fine but did not fix my issue.

like image 1000
Brian Moeskau Avatar asked Oct 29 '12 18:10

Brian Moeskau


4 Answers

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');

like image 147
Sachin Maharjan Avatar answered Oct 02 '22 02:10

Sachin Maharjan


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.

like image 31
Brian Moeskau Avatar answered Oct 02 '22 02:10

Brian Moeskau


If you have MAMP instead of XAMP the solution above won't work for you. Open MAMP then on the top menu go to Tools->Upgrade MySQL databases. Now open Mysql Workbench and it should list all your tables correctly

like image 26
Darwin Santos Arismendy Avatar answered Oct 02 '22 00:10

Darwin Santos Arismendy


If you are using linux distro the run following command:

mysql_upgrade -u root -p
like image 34
hizbul25 Avatar answered Oct 02 '22 01:10

hizbul25