LoginSignup
6
2

More than 1 year has passed since last update.

VSCode で DB を GUI 操作する MySQL Shell for VS Code が WSL2 で利用出来ない件

Posted at

WSL2 上にインストールして使おうとすると、エラー発生
どうやら証明書のインストールでコケている模様

[31mERROR: [0mcore.installShellWebCertificate: User-defined function threw an exception: Traceback (most recent call last): File "/home/xxxxxxxx/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.1.3-linux-x64/shell/lib/mysqlsh/plugins/gui_plugin/core/Certificates.py", line 159, in install_shell_web_certificate raise SystemError("UNABLE to find terminal!") SystemError: UNABLE to find terminal!

mysql.png

これが噂のおま OS か…と途方に暮れていましたが、github 見てみたら issue 出てました。

issue の内容を見ながら作業していったら無事解決したので、メモとして残します。

証明書を手動インストールする

下記の sh ファイルを実行する

~/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/install.sh

これで終わりではなく、どうやら windows にも証明書をインストールする必要がある模様…

windows 側に証明書をインストールする

下記ファイルを windows のエクスプローラーで表示

~/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/rootCA.crt

対象ファイル rootCA.crt を右クリックして「証明書のインストール」

mysql6.png

証明書のインポートウィザード1

「現在のユーザー」を選択して次へ

mysql1.png

証明書のインポートウィザード2

「証明書を全て次のストアに配置する」を選択
証明書ストアに「信頼されたルート証明機関」を選択

mysql2.png

証明書のインポートウィザードの完了

完了をクリックして、証明書をインストール

mysql3.png

終わったら、vs code を再起動

MySQL Shell for VS Code

DATABASE の + をクリック

mysql4.png

Database Connection Configuration ウィンドウが表示されればOK

mysql5.png

※僕はこれで解決しましたが、対象 issue では未だ解決出来ていないようです。

6
2
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
6
2