在windows10上安装wsl2,安装ubuntu,安装apache。
Windows 10 Version 2004(OS Built 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
,显然有些地方出了问题,有没有人有办法解决这个问题?谢谢
发布于 2020-01-31 20:52:49
我放弃了其中一个,删除了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'
https://stackoverflow.com/questions/59973590
复制相似问题