MySQL(オラクルインストール版) rootのパスワードをリセット(M1)

MySQLのサーバー停止後

sudo mysqld_safe --skip-grant-tables


別ターミナルを立ち上げて

mysql -u root
UPDATE mysql.user SET authentication_string=null WHERE User='root';
FLUSH PRIVILEGES;
exit;


MySQLのサーバーを再起動して (オラクルインストール版の場合mysql.serverコマンドはアクセスできないため、システム環境から再起動する)

mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourpasswd';


create user admin@localhost identified by 'yourpasswd';

//参考URL
https://gist.github.com/zubaer-ahammed/c81c9a0e37adc1cb9a6cdc61c4190f52

VSCode 自作スニペット

File>Preference>ConfigureUserSnippets

   "Arrow function": {
        "scope": "javascript,typescript",
        "prefix": "af",
        "body": [
          "($1) => {$2}"
        ]
      },

scopeパラメータで適宜言語を加える javascriptreact,typescriptreact等

//参考URL
http://www.natural-science.or.jp/article/20190223075657.php