#mysql -u root -p 

会报错 command not found

解决方案: #sudo ln -s /usr/local/mysql/bin/mysql /usr/local/bin

#mysql -u root -p

password:

mysql>status; <注意加分号>

Mac 电脑 配置Mysql 默认编码utf8


可以看见 Server characterset: latin1,  Db characterset : latin1

终端打开一个新窗口

这时候要确定mysql 是stoped状态

#cd  /etc

#sudo vi my.cnf

然后输入以下

Mac 电脑 配置Mysql 默认编码utf8


wq 保存文件

重启Mysql


要是还不行  可以用mysql指令

alter database clubot character set utf8;



相关文章:

  • 2021-11-14
  • 2021-07-14
  • 2022-03-06
  • 2022-02-07
  • 2021-08-14
  • 2021-05-28
  • 2022-02-10
  • 2022-02-08
猜你喜欢
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-03-02
  • 2021-06-12
  • 2022-01-03
相关资源
相似解决方案