0x001
其实linux就是一内核,各种发行版差距并不是很大,最大的不同应该还就是他们使用不同的包管理器,有yum、apt、pacman等等吧,redhat系一般使用yum,debian系(比如debian ubuntu armbian)使用的大多是apt,arch系一般都是pacman,当然也不只是这一些,而且centos使用apt也不是不行的。
0x002 Ubuntu安装mysql
这个就是很基础的命令了
#apt install mysql-server mysql-client -y
基本就能解决问题,尤其是在ubuntu18.04版本之前,因为在安装过程中,软件会直接询问你设置mysql的密码,但是18.04版本(可能新版也是这样)是没有这个提示的,程序使用默认的随机密码。
0x003 填坑Ubuntu18.04
使用
sudo cat /etc/mysql/debian.cnf
即可看到user和password
使用mysql -u[user] -p[password]登入mysql
use mysql;
update mysql.user set authentication_string=password('123456') where user='root' and Host ='localhost';
update user set plugin="mysql_native_password";
flush privileges;
quit;
后面就可以使用你的root账号密码登录mysql了
网友评论