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

前端 未结 4 1513
小蘑菇
小蘑菇 2020-12-23 10:11

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: mysq

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 10:53

    1. Open your .profile file in Mac. This can be done by entering the terminal and typing

      pico ~/.profile
      
    2. Add the following line to your ./profile file. Replace the path where you installed Xampp, however by default this is the route and should work:

      export PATH=/opt/local/bin:/opt/local/sbin:/Applications/xampp/xamppfiles/bin:$PATH
      
    3. Open a new terminal window (Recommendation is to quit all terminal windows and then reopen) and type:

      mysql
      

    That is all, isn't easy!!

提交回复
热议问题