3
4

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 1 year has passed since last update.

【Lando】MySQL - 日本語の文字化けを解消する方法

Last updated at Posted at 2023-04-27

現象

Lando環境でMySQLに接続し、SQL文で取得した日本語文字が「???」になる。

対応方法

drushを使用すると簡単にSQLに接続が可能。
次の2つのパターンで接続できる。
パターン①だとコマンドを叩いた直後で、Landoで使用しているアプリのDBに接続可能だが、日本語が文字化けする。
パターン②では文字化けが解消されるがDBを選択する必要がある。use {DB名} で接続が必要。

## パターン① 日本語が文字化けしてしまう。
drush sqlc
## パターン② 文字化けしない方法。
drush mysql

参考

LandoアプリにDrushをインストールできるコマンド
composer require drush/drush

3
4
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
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?