Solve the problem of error reporting when WSL connects to the database in Win10 system

Problem: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)
When connecting, you need to add the identity of the sudo system administrator to execute the command

sudo mysql -u username -p

Guess you like

Origin blog.csdn.net/weixin_44229976/article/details/131845213