mysql command not found on mac after installation

mysql command not found on mac after installation

After downloading mysql dmg on mac if you go to terminal and try to issue mysql command and get mysql command not found there keep reading.

This, in most cases, is the terminal not knowing the mysql command unless you go to the actual installation folder.

To check that out, go to

/user/local/mysql/bin/mysql --version

If this is giving you the right mysql information, then it is a matter of telling the terminal what the mysql command is.

Temporary fix

export PATH=$PATH:/usr/local/mysql/bin

The above command would allow the command files to be recognized by the current issuing terminal. But you won’t be able to access those on new terminal

Permanent fix

echo "export PATH=$PATH:/usr/local/mysql/bin" >>~/.bash_profile

The above command would simply append the path command you exported to the .bash_profile file.

Setting new Vagrant machine for PHP-Mysql development

error duplicate entry for key when creating new unique key mysql

Using mysql keyword as column in Doctrine Entity – PHP

Connecting to Vagrant [PuPHPet] MySql from host

Points on Oracle MySQL Associate Certification Exam

Cannot truncate a table referenced in a foreign key constraint mysql error

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*