1.下載
wget https://www.apachefriends.org/xampp-files/5.6.37/xampp-linux-x64-5.6.37-0-installer.run
2.安裝
chmod -R 777 ampp-linux-x64-5.6.37-0-installer.run
./ampp-linux-x64-5.6.37-0-installer.run
3.啓動
/opt/lamp/lamp start
4.環境變量
在etc/profile末尾添加下面代碼
export PATH=$PATH:/opt/lampp/bin
執行source /etc/profile 或 執行./profile使其生效,可以通過echo $PATH 命令查看是否添加成功
5.修改mysql初始密碼
mysql默認密碼爲空
連接數據庫: mysql -uroot -p
設置密碼
grant all privileges on *.* to 'root'@'%' identified by '12345678' with grant option;