mysql 快速入门

  • download

mysql-5.7.30-macos10.14-x86_64.dmg

ls /usr/local/mysql

export PATH=${PATH}:/usr/local/mysql/bin

echo $SHELL
snowdreams1006@snowdreams1006deMacBook-Pro bin % whereis mysql
snowdreams1006@snowdreams1006deMacBook-Pro bin % which mysql
mysql not found
# mysql
export MYSQL_HOME=/usr/local/mysql
export PATH=$MYSQL_HOME/bin:$PATH
mysql -uroot -p

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('新密码');

ref doc

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');

Last updated