installing mysql-server on ubuntu 18.04 subsystem windows 10.
Cannot open /proc/net/unix: No such file or directory
Cannot stat file /proc/1/fd/5: Operation not
I can't install mysql on wsl either (mysql 5.7.30, ubuntu 18.04, win10 1909), so there is workaround here. Install and run mysql on windows, then connect it from ubuntu bash by using:
mysql -u root -p --host=127.0.0.1 --port=3306 --protocol=TCP
Also need to config Database in your porject settings. Don't use localhost, and port is 3306 on my pc, might be different from yours. Hope they can fix it on wsl2.
I meet save issue. The reason is you have a MySQL-server installed on your native OS Win10. How to fix it:
Go to Windows service, stop the MySQL service.
Modify my.ini under MySQL server folder, mine is C:\Program Files\MySQL\MySQL Server 5.5
[mysqld]
\# The TCP/IP Port the MySQL Server will listen on
port=3306 -> 3308 or other
Restart your wsl instance.
Reinstall the MySQL-server with root account
apt install mysql-server
service mysql start
mysql_secure_installation
as mentioned a guy at github and it solved my problem The problem is with the script "/etc/profile.d/wsl-integration.sh". As a quick workaround insert the following line before the first line in "/etc/profile.d/wsl-integration.sh" (use sudo to edit the file):
# Check if we have HOME folder
if [ "${HOME}" = "/" ]; then
return
fi
I mean before the line:
WSL_INTEGRATION_CACHE=$HOME/.cache/wslu/integration`
I am using Ubuntu 18.04 under Windows 10 as a Subsystem, so You have to start off by adding repositories required by MariaDB by :
sudo apt-get install software-properties-common
Then update your installation by :
sudo apt update
Install MariaDB by :
sudo apt install mariadb-server
You’ll be prompted to set a root password and wait for the installation to continue. Issue the following command once installation is complete:
sudo service mysql start
That’s it and to check both your mysql and mariadb version try:
mysql --version
For anyone running into this issue, Close and reopen WSL and then run sudo service mysql start sudo dpkg --configure -a it should complete.
I had a MySQL already running on my native Windows 10 system. It must have been trying to fight for the same defaults. I tried switching native MySQL off and then working with WSL installation and it worked somehow.