Thursday, March 30, 2017

macos - $PATH issues with OSX Lion

I'm having some issues with running mysql from terminal:



macmini:~ michael$ which mysql
/Applications/XAMPP/xamppfiles/bin/mysql
macmini:~ michael$ mysql

-bash: /usr/local/mysql/bin/mysql: No such file or directory


I had a previous installation at /usr/local/mysql/bin/mysql which no longer exists.



My path variable is as follows:



macmini:~ michael$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/Applications/XAMPP/xamppfiles/bin/:/usr/local/bin:/usr/X11/bin:/usr/local/MacGPG2/bin:/usr/texbin



Dropping to root seems to function correctly:



macmini:~ michael$ sudo bash
Password:
bash-3.2# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 66
Server version: 5.1.44 Source distribution


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>


I seem to have found the issue - but I'm not sure how to change or remove this alias



macmini:~ michael$ type -a mysql
mysql is aliased to `/usr/local/mysql/bin/mysql'
mysql is /Applications/XAMPP/xamppfiles/bin/mysql

mysql is /Applications/XAMPP/xamppfiles/bin/mysql

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...