2

So have wsl 2 setup on windows 10, installed ubuntu, imstalled apache.

Windows 10 Version 2004(OS Built 19041.21) / Ubuntu 18.04

Now at the next stage and trying to install mariadb. Have installed it following the instructions here https://computingforgeeks.com/install-mariadb-10-on-ubuntu-18-04-and-centos-7/

Specifically sudo apt -y install mariadb-server mariadb-client Did not get asked for a password, so followed the next step sudo mysql_secure_installation Where I now get the following error

Enter current password for root (enter for none):
Warning: World-writable config file '/mnt/c/Users/soup/.my.cnf.42' is ignored`

It is obviously ignoring /etc/mysql/my.cnf, which have given correct user/rights to (makes no difference if 600, 644, 755)

sudo chown mysql:mysql /etc/mysql/my.cnf
sudo chmod 600 /etc/mysql/my.cnf

And trying to use a windows temp file. Also when trying sudo service mysql restart get the message mysql: unrecognized service Something has obviously gone wrong Anyone got any ideas how to fix this? thanks

John Smith
  • 1,812
  • 1
  • 16
  • 17
  • I have given up one this, and removed mariadb and installed mysql. This is some sort of wsl error which will no doubt be sorted out in a later release Completely purged mariadb ' sudo apt-get remove --purge mysql* sudo apt-get autoremove sudo apt-get autoclean sudo apt-get remove dbconfig-mysql sudo apt-get dist-upgrade sudo apt-get install mysql-server And installed mysql instead sudo apt install mysql-server sudo mysql_secure_installation sudo service mysql start – John Smith Jan 31 '20 at 12:50

1 Answers1

1

I have given up one this, and removed mariadb and installed mysql. This is some sort of wsl error which will no doubt be sorted out in a later release

Completely purged mariadb

sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-mysql
sudo apt-get dist-upgrade
sudo apt-get install mysql-server'

And installed mysql instead

sudo apt install mysql-server
sudo mysql_secure_installation
sudo service mysql start'
John Smith
  • 1,812
  • 1
  • 16
  • 17