How do i access mysql from mac terminal, using xampp?

后端 未结 8 2086
忘了有多久
忘了有多久 2020-12-13 15:42

I am trying to access mysql from my mac\'s terminal.

I have tried just typing

mysql -u root -p

(and Enter, but that doe

相关标签:
8条回答
  • 2020-12-13 15:55

    I'm just a new xampp user. I am also trapped by this question. Yes, the right directory is

    /Applications/XAMPP/xamppfiles/bin/(the newest xampp is uppercase)
    

    but when you connect to db, you should type

    ./mysql -u root -p (if there's password),
    

    not input

    mysql -u root -p...   
    

    directly, it wordked successfully on my macbook pro.

    0 讨论(0)
  • 2020-12-13 15:57

    if the xampp is install in your mac book just go the file path of cd /Applications/XAMPP/bin/

    ./mysql -u root -p

    than it will ask for password if set than type else enter

    mysql is started now !!!!!!!!

    0 讨论(0)
  • 2020-12-13 16:03
    sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
    
    0 讨论(0)
  • 2020-12-13 16:07

    Nice feature on Mac is to open terminal and go to preferences. Hit profiles tab and create a new profile. under shell type the path to MySQL and enter in everything as you would when going the long way. Ex:

    /Applications/XAMPP/xamppfiles/bin/mysql --user=root --password=

    Just add your info on the path above. close the preference window and go to FILE and hit new window. Chose your profile. I named mine MySql. Thats it.

    0 讨论(0)
  • 2020-12-13 16:12

    /Applications/xampp/xamppfiles/bin/mysql -u root -p

    Worked like a charm!

    Thanks to user: Wrikken!

    0 讨论(0)
  • 2020-12-13 16:14

    I had to use open command for me to work.

    e.x.

    open /App/Applications/xampp/xamppfiles/bin/mysql

    0 讨论(0)
提交回复
热议问题