Mac install and open mysql using terminal

后端 未结 10 1319
你的背包
你的背包 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:57

    open terminal and type

    sudo sh -c 'echo /usr/local/mysql/bin > /etc/paths.d/mysql'
    

    then close terminal and open a new terminal and type

    mysql -u root -p
    

    hit enter, and it will ask you for password

    I have found this solution on https://teamtreehouse.com/community/says-mysql-command-not-found

    now to set new password type

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
    

提交回复
热议问题