Saya perlu mengatur ulang kata sandi root instalasi mysql lokal saya tetapi tidak mengizinkan saya. Saya sudah mencoba ini:
$ sudo /etc/init.d/mysql stop
* Stopping MySQL database server mysqld [ OK ]
[1]- Exit 1 sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking
[2]+ Exit 1 sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking
reg@regDesktopHome:~$ sudo mysqld --skip-grant-tables &
[1] 13651
reg@regDesktopHome:~$ 140627 19:02:02 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
reg@regDesktopHome:~$ mysql -u root mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
reg@regDesktopHome:~$ sudo mysql -u root mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[1]+ Exit 1 sudo mysqld --skip-grant-tables
Bagaimana saya bisa mendapatkan ulang kata sandi? sunting 1 Saya mendapat ini:
$ ps ax| grep mysql
16515 ? Ssl 0:00 /usr/sbin/mysqld
16551 pts/23 S+ 0:00 grep --color=auto mysql
reg@regDesktopHome:~/semios/v3upgrade$ sudo kill -9 16515
reg@regDesktopHome:~/semios/v3upgrade$ ps ax| grep mysql
16678 ? Ssl 0:00 /usr/sbin/mysqld
16715 pts/23 S+ 0:00 grep --color=auto mysql
reg@regDesktopHome:~/semios/v3upgrade$ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Sepertinya proses secara otomatis me-restart mysql segera setelah saya membunuhnya ...
dpkg-reconfigure mariadb-server-10.1
berfungsi untuk MariaDB ketika semua solusi lain tidak. Terima kasih untuk ini.