0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

moodle導入時のエラー訂正

Posted at

##moodleのサーバをたてて接続したら…
なんかエラーが出ている
image.png

調べてみるとmysqlの設定にエンコードの記述を増やせばいいっぽい

##以下mysqlサーバにて作業
/etc/mysqlのディレクトリ内にあるmy.cnfを編集する

nano /etc/mysql/my.cnf

以下の記述を加える

[client]
default-character-set = utf8mb4

~

[mysqld]
innodb_file_format = Barracuda
innodb_file_per_table = 1
innodb_large_prefix

character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake

~

[mysql]
default-character-set = utf8mb4

その後再起動することで設定が反映される

dockerで立てている場合なら

docker restart コンテナ名

で再起動がかけられる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?