Skip to content

Instantly share code, notes, and snippets.

@lexavey
Last active December 18, 2022 19:52
Show Gist options
  • Save lexavey/108bc72b0623671d83e469a44f9dc040 to your computer and use it in GitHub Desktop.
Save lexavey/108bc72b0623671d83e469a44f9dc040 to your computer and use it in GitHub Desktop.
Install phpmyadmin and apache2 in WSL
#!/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