Skip to content

Install MySQL server on Windows 10 bash

FiveTech Software edited this page May 21, 2019 · 18 revisions

sudo apt-get update

sudo apt-get install mysql-server

sudo service mysql start

sudo mysql -uroot -p

mysql> show databases;

mysql> exit;

sudo apt-get install libmysqlclient-dev


If the mysql-server installation stops with this error:

Cannot stat file /proc/1/fd/5: Operation not permitted

then, close the bash, reopen it and do this:

sudo service mysql start

sudo dpkg --configure -a

https://stackoverflow.com/questions/54835516/windows-subsystem-install-mysql-server


location for client lib: /usr/lib/x86_64-linux-gnu/libmysqlclient.so


In case that you want to uninstall it:

sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
Completely uninstall MySQL Client Core 5.7:
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.7 mysql-client-core-5.7
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql