Installing MySQL Workbench but File /etc/my.cnf doesn't exist
Asked Answered
C

3

6

I managed to download the MySQL DMG archive to my OS (mac OS X). It works if I use the command line. Now, I'm trying to install MySQL Workbench. I've created MySQL Connection but once I'm testing the host machine settings, I get:

Checking command 'ps xa | grep "/usr/local/mysql.*/bin/[m]ysqld"'
Server detected as running
Check if /etc/my.cnf can be accessed
Operation failed: File /etc/my.cnf doesn't exist

I'm trying to find the file my.cnf and I get:

Didis-MacBook:~ Didi$ find . -type f -name "*my.cnf*"
find: ./perms/newdir: Permission denied

So I tried to create my own "my.cnf" by entering:

cd /usr/local/mysql/support-files/
sudo cp my-huge.cnf /etc/my.cnf

Then it asked for a password. I don't remember setting up a password. So I typed:

/usr/local/psa/bin/admin --show-password

and get:

-bash: /usr/local/psa/bin/admin: No such file or directory.

I believe my password should be in /etc/passwd but I have no dir "etc" in my system!

I'm running out of ideas, can somebody help me please?

Caul answered 17/1, 2014 at 3:56 Comment(0)
C
13

I figured it out:

  1. Went to my terminal and typed:

     passwd
     Old password was blank
     I created a new password (it was THAT simple)
    
  2. I created a "etc" directory

  3. I checked the files under /usr/local/mysql/support-files/ and saw my cnf file was actually named my-default.cnf and not my-huge.cnf like the developer at the MySQL site.

  4. So I typed: sudo cp my-default.cnf /etc/my.cnf

  5. went back to the Workbench and it FINALLY said:

    Testing host machine settings is done.

Caul answered 17/1, 2014 at 4:43 Comment(1)
According to the MySQL site, MySQL versions < 5.6.8 had several default configs including the my-huge.cnf. New versions no longer have these default configs.Reeves
D
10

The MySQL Server installation on OS X does not include a cnf file, so it is normal that you get the warning. Nonetheless you can continue creating the connection without problems (ignore the warning). When you start MySQL Workbench afterwards and try to manage the configuration of the server, you will get another warning, but you can continue and MySQL Workbench creates the cnf file for you. No need to do all that manually.

Durant answered 18/1, 2014 at 10:4 Comment(0)
N
3

I met this problem too. I just clicked the continue button until i was at "Review remote management settings" step, and stop here click "change parameters", then continue. At "Path to configuration file" choose the path point to my-default.cnf. Then check path, it works

Nicolina answered 4/6, 2014 at 3:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.