2

I have been going back and forth with this issue. Apparently there is an installation of mysql installed by default on mac(?) and its conflicting with my homebrew installation of mysql.

I have uninstalled and reinstalled per the following link:

brew install mysql on mac os

Problem is that I get this error:

ERROR: can't create .my.cnf.42561: Permission denied at /usr/local/bin/mysql_secure_installation line 105.
Cleaning up...
Warning: Could not unlink .my.cnf.42561: No such file or directory
Warning: Could not unlink .mysql.42561: No such file or directory

So of course I try and find that file via locate my.cnf and all I get is this:

/usr/local/Cellar/mysql/5.6.25/mysql-test/include/default_my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/federated/my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/ndb/my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/ndb_big/my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/ndb_binlog/my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/ndb_rpl/my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/ndb_team/my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/rpl/extension/bhs/my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/rpl/my.cnf
/usr/local/Cellar/mysql/5.6.25/mysql-test/suite/rpl_ndb/my.cnf
/usr/local/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18/spec/my.cnf.example

And in the brew install of mysql I got this error:

A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.

/etc/my.cnf does not exist....really confused on this one.

Any help?

Community
  • 1
  • 1
lcm
  • 1,627
  • 5
  • 16
  • 35

1 Answers1

1

I am sure you have already solved this problem, but incase someone stumbled upon this via search, the solution is to run the command with elevated privileges.

sudo mysql_secure_installation