所以在Windows 10上安装了wsl 2,安装了ubuntu,安装了Apache。
Windows 10版本2004(操作系统内置19041.21)/ Ubuntu 18.04
现在进入下一阶段,并尝试安装mariadb。按照此处的说明进行安装https://computingforgeeks.com/install-mariadb-10-on-ubuntu-18-04-and-centos-7/
特别是sudo apt -y install mariadb-server mariadb-client
没有要求输入密码,因此继续下一步sudo mysql_secure_installation
我现在哪里出现以下错误
Enter current password for root (enter for none):
Warning: World-writable config file '/mnt/c/Users/soup/.my.cnf.42' is ignored`
显然是忽略了/etc/mysql/my.cnf,它已经赋予了正确的用户/权限(如果600、644、755则没有区别)
sudo chown mysql:mysql /etc/mysql/my.cnf
sudo chmod 600 /etc/mysql/my.cnf
并尝试使用Windows临时文件。还在尝试时sudo service mysql restart
收到消息mysql: unrecognized service
显然出了点问题任何人都知道如何解决此问题?谢谢
我已经放弃了一个,并删除了mariadb并安装了mysql。这是某种wsl错误,无疑会在以后的版本中解决。
已完全清除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'
并安装了mysql
sudo apt install mysql-server
sudo mysql_secure_installation
sudo service mysql start'