我是这么配置mariadb的。 为了能够操作汉字数据~

为了能够操作汉字数据~

以下是步骤:

1. 找到my.cnf

  /etc/my.cnf

2. 打开它,在[client]和[mysql]下输入以下指令

  default-character-set=utf8  PS:如果没有则添加上

3. 在[mysqld]标签下输入以下指令

  init_connect='SET collation_connection = utf8_unicode_ci'

  init_connect='SET NAMES utf8'

  character-set-server=utf8

  collation-server=utf8_unicode_ci

  skip-character-set-client-handshake

3. 重启mysql服务

  systemctl restart mariadb

PS:以上是在root下进行。

  

原文地址:https://www.cnblogs.com/the-one/p/8228926.html