How do connect to MySQL on Mac OS X El Captain just by typing MySQL? I made a .bash_proile file in my home directory with:
export PATH="/usr/local/mysql/bin:$PATH", but when I type mysql in the terminal when I am in my home directory I get this error - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Any help would be greatly appreciated!
Also how can I list all the users on the server?
Provide the credentials as command line arguments. From the documentation: http://dev.mysql.com/doc/refman/5.7/en/mysql.html
mysql --user=user_name --password=your_password db_name