想請問一下我用Ubuntu16.04.2 安裝MariaDB版本是「10.0.29」,輸入「systemctl stop mysql」後DB一樣可以連,發現將「root@localhost」的密碼設為空,運行「systemctl stop mysql」是正常的,但如果將「root@localhost」設定上密碼,那運行「systemctl stop mysql」DB也不會停,請問有人遇到同樣的問題嗎?
Mariadb service 應該是 mariadb 吧
「root@localhost」設定上密碼,那運行「systemctl stop mysql」的錯誤訊息
Userver systemd[1]: Stopped LSB: Start and stop the mysql database server daemon.
mysql.service: Unit entered failed state.
mysql.service: Failed with result 'exit-code'.
在「/var/log/mysql/error.log」中沒有錯誤訊息
找到解決的方式了,在「debian.cnf」中的「password」也要改成相同密碼就可以解決了
Ubuntu14.04的debian.cnf預設是「user=debian-sys-maint」
Ubuntu16.04的debian.cnf預設是「user=root」
所以我改「root@localhost」的密碼才有問題
反正不要去動root@localhost的密碼就是了
他預設是只能localhost登入吧?而且應該也有密碼吧?
那安全性應該還好吧...
預設root@localhost是沒有密碼 按Enter就能進了