apt-get update && apt-get upgrade #更新主机
apt-get install apache2 && apt-get install mariadb-server && apt-get install php && apt-get install phpmyadmin #安装lamp环境(debian9默认安装mariadb,phpmyadmin不支持数据库root用户加空密码登录)
linux终端输入mysql #进入mysql
CREATE USER '用户名'@'localhost' IDENTIFIED BY '密码'; #创建mariadb用户
GRANT ALL PRIVILEGES ON *.* TO '用户名'@'localhost' WITH GRANT OPTION; #给用户一定的权限