INSTALL MYSQL IN MAC

Posted 思微随想

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了INSTALL MYSQL IN MAC相关的知识,希望对你有一定的参考价值。

安装好mysql后,在System References中找到MYSQL,启动它。

 

启动之后在终端中输入添加MySQL路径的命令,把MYSQL路径添加到PATH中:

PATH="$PATH":/usr/local/mysql/bin

 

在终端登录到MySQL的命令如下:mysql -u root -p

当你执行任何语句的时候如show databases是会出现类似以下的错误,请用SET PASSWORD修改密码。

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> SET PASSWORD = PASSWORD(\'123456); 

 

以上是关于INSTALL MYSQL IN MAC的主要内容,如果未能解决你的问题,请参考以下文章

Install MySQL in Ubuntu 16.04 LTS

`block in replace_gem': Please install the mysql2 adapter: `gem install activerecord-mysql2-adap

install mysql in centos and change passoword

Install Local SQL In Mac OS

DBD-mysql 已安装,但仍然出现错误“install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC”

Centos8安装mysql5.7,修改mysql初始密码,使root可以访问远程主机. install mysql5.7 in Centos8, and change mysql initial p