Search code examples
mysqlmacosxampp

How can I access the mysql command line tool when using XAMPP in OS X?


I've got a vanilla install of XAMPP in OS X. How can I access the mysql command line tool? I've tried typing "mysql" at the command line, and it spits back "-bash: mysql: command not found".


Solution

  • XAMPP is installed in Mac OS X in the following directory:

    /Applications/XAMPP/
    

    You can look what's inside that directory and run mysql command line tool providing the full path to it:

    $ /Applications/XAMPP/xamppfiles/bin/mysql
    

    If you need, you can modify your PATH environment variable to include XAMPP binaries and you won't need to specify the whole path all the time.