Connecting to mysql via terminal

Hello,

I am having some issues getting sql to work when trying to set my rails project. I have the latest version of both ruby and rails, the issue I believe lies within my terminal PATH. When typing gem install mysql, I get the following error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /Users/myName/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/mysql-2.9.1/COPYING.

And when echoing my PATH I get the following description:
/Users/myName/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
This is a messed up path, and yes I have specified the PATH I want in the .bash_profile. My desired path looks like this:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" It just doesn't seem to work. Any ideas of what I am doing wrong? Running Sierra on a Macbook Pro 2015.

Thanks in advance for the help!

This is a Microsoft SQL Server forum, so folk here might not have knowledge of MySQL

My bad... Do you have a recommendation to where I can ask this question?

No problem. Pretty sure there is a forum on MySQL.com

Yup ... just checked ... lots of messages on there so i reckon its very active :slight_smile:
https://forums.mysql.com/

best of luck :toast:

Thanks a ton!

whatever command line tool you are using open it in Administrator mode maybe?

Thanks for suggestion