Mac install and open mysql using terminal

后端 未结 10 1318
你的背包
你的背包 2021-01-29 19:29

I downloaded the mysql dmg file and went through the wizard to run. Done. I have also started mysql server under system preferences.

The purpose of me doing this is to w

10条回答
  •  离开以前
    2021-01-29 19:55

    (Updated for 2017)

    When you installed MySQL it generated a password for the root user. You can connect using

    /usr/local/mysql/bin/mysql -u root -p
    

    and type in the generated password.

    Previously, the root user in MySQL used to not have a password and could only connect from localhost. So you would connect using

    /usr/local/mysql/bin/mysql -u root
    

提交回复
热议问题