Reputation: 35
When I try to access mysql in the command line get the following error:
mysql: unknown option '--root'
Mysql is installed via brew, version 5.6.27, OSX El Capitan with SIP turned off.
Upvotes: 0
Views: 7829
Reputation: 614
I had such error (but with message "mysql: unknown option --mysqld]") when forgot opening '[' symbol in /etc/mysql/my.cnf, It was looking like:
mysqld] #<-- forgot opening [
innodb-file-format=barracuda
innodb-file-per-table=1
...
Check this! (thanks to Siru, found in a moment!)
Upvotes: 0
Reputation: 89
This is an old thread however, it can help someone. I came up with the same issue then later I have discovered that there was a wrong entry in .my.cnf file in my home folder. You probably have a wrong entry on your
/root/.my.cnf or .my.cnf
file on your home directory.
Renaming the file will help you solve the issue.
Upvotes: 1