概览:
安装Mysql
1 | sudo apt install mysql-server |
现在的mysql,默认安装时不提供设置密码。
所以,这能以默认用户登录来添加用户·及修改密码。
1 | sudo nano /etc/mysql/debian.cnf |
内容像这样
1 | # Automatically generated for Debian scripts. DO NOT TOUCH! |
以上信息可以得出:
用户名:
debian-sys-maint
密码:
JVSGL6hCuThRoMcX
查看用户列表
1 | select user,host from mysql.user; |
输出
1 | mysql> select user,host from mysql.user; |
修改密码
1 | mysql> use mysql; |
成功
1 | mardan@Mardan666-WS:~$ mysql -u root -p88888888 |
安装phpMyAdmin
1 | sudo apt install apache2 |
软连接
1 | sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin |