wsl-ubuntu how to install mysql and set password and connect gui such as sqlyog

一. 【apt-get install mysql-server-8.0 】
Here I am using the mirror of CSU, I do not know if it is an old mirror or a new mirror, in short, only the latest mysql-8.0 But mysql-5.7 seems to have problems with Chinese input, you can try other mirrors have 5.7 versions, but I have the fastest speed of this version of the mirror, all tested, not all CSU mirrors are the same fast, not the same. There should be a difference between old and new

二. 【sudo service mysql stop; sudo usermod -d /var/lib/mysql/ mysql ; sudo service mysql start;】
However, after typing mysql, I found the error sock2 Missing file location not found Enter the above command

三 【mysql;use mysql;ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘密码’;FLUSH PRIVILEGES;】
Now you should find that you can go into mysql without entering any password, this is not our goal, we want to set the password, here the settings are the same whether it is mysql 5.7 or 8.0

四 login sqlyog is ok;

蹩脚英语,见笑了。若能看懂 送你们一场造化。
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值