Last active
December 18, 2022 19:52
-
-
Save lexavey/108bc72b0623671d83e469a44f9dc040 to your computer and use it in GitHub Desktop.
Install phpmyadmin and apache2 in WSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update && sudo apt upgrade | |
sudo apt install mysql-server | |
sudo service mysql start | |
#Reset root password | |
sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'jancok123';flush privileges;" | |
sudo apt install apache2 | |
sudo apt install phpmyadmin | |
#WSL fix | |
sudo sed -i 's/localhost/127.0.0.1/' /etc/phpmyadmin/config-db.php | |
sudo echo "\$cfg['SendErrorReports'] = 'never';">>/etc/phpmyadmin/config.inc.php ## Disable deprecated | |
sudo service apache2 restart | |
sudo service mysql restart | |
# now access at localhost/phpmyadmin/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment