To check MySQL version of the MAMP, use the below command in the Terminal:
Assume you have started the MAMP.
./mysql Ver 14.14 Distrib 5.1.44, for apple-darwin8.11.1 (i386) using EditLine wrapper
Furthermore, if you want to find where does the MySQL installed in the system, use the below command:
type -a mysql
type -a it is an equivalent of tclsh built-in command where in the OS X bash shell. When MySQL is detected, it will display:
mysql is /usr/bin/mysql
If not detected, it will show:
-bash: type: mysql: not found
By default, MySQL will not be installed in Mac OS X.
For the XAMPP, the command should be:
Want to be a SQL expert? Come and join this SQL Certification course by Intellipaat.
You can check out the below MySQL Tutorial video for better understanding.