wget -c "https://gist.github.com/e-cloud/34acbefe0597a02f9a081a01eff6dd24/raw/3bad7148f60ab70659b0be14ef07b0bd4d019f62/install-mysql8-on-wsl.sh" install-mysql8-on-wsl.sh
chmod 740 install-mysql8-on-wsl.sh
./install-mysql8-on-wsl.sh
-
-
Save khoimm92/8aa65627289a6fff3a8886511137791d to your computer and use it in GitHub Desktop.
Install mysql 8.0 on 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
#!/usr/bin/env bash | |
mysql_apt_deb=mysql-apt-config_0.8.14-1_all.deb | |
sudo apt-get remove mysql-server mysql-client -y | |
sudo apt-get autoremove -y && sudo apt-get autoclean -y | |
wget –c "https://dev.mysql.com/get/${mysql_apt_deb}" | |
sudo dpkg -i $mysql_apt_deb # select 5.7 | |
sudo apt-get update | |
sudo apt policy mysql-server #(it will show 5.x is the default candidate) | |
sudo apt-get -y install mysql-server | |
# ensure your host windows have no mysql service running | |
sudo service mysql start | |
sudo service mysql stop | |
sudo dpkg -i $mysql_apt_deb # select 8.0 | |
sudo apt-get update | |
sudo apt policy mysql-server #(it will show 8.x is the default candidate) | |
sudo apt-get -y install mysql-server | |
sudo sed -ie 's/\/usr\/share\/mysql\/mysql-helpers/\/usr\/share\/mysql-8.0\/mysql-helpers/' /etc/init.d/mysql | |
sudo service mysql start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment