WSLで
$ sudo apt install mysql-server mysql-client
でMySQLをインストールして、起動しようとすると、
$ sudo mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
とか、
$ service mysql start df: /var/lib/mysql/.: Permission denied * /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
とか
$ sudo service mysql start * Starting MySQL database server mysqld No directory, logging in with HOME=/ mkdir: cannot create directory ‘//.cache’: Permission denied
- su: 19: /etc/profile.d/wsl-integration.sh: cannot create //.cache/wslu/integration: Directory nonexistent
とかなってうまくいかない。
ので、Stackoverflowでみつけたやり方でやった。多分WSLだとsockがないとか、うまく作れないのだろう。
MySQLの一通りの使い方。
tomato-develop.com