Created
January 21, 2020 15:43
-
-
Save Michael-Stokoe/8165ccd06d51d78e96bc1580d87cc5a2 to your computer and use it in GitHub Desktop.
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
# Add these lines to your .bashrc to automatically start MySQL in WSL. | |
function mysql_startup() { | |
i=`ps -eaf | grep -i mysql |sed '/^$/d' | wc -l` | |
if [[ $i > 1 ]] | |
then | |
echo "MySQL is already running." | |
else | |
sudo service mysql start | |
echo "MySQL started!" | |
fi | |
} | |
mysql_startup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment