Buongiorno a tutti, ho il seguente problema:

Anche seguendo questi passi(link sotto), non cambia la password:

https://wiki.ubuntu-it.org/Server/MySql/PasswordReset

my_user@MACCHINA:~/Scrivania$ sudo /etc/init.d/mysql stop

Stopping mysql (via systemctl): mysql.service.

my_user@MACCHINA:~/Scrivania$ /usr/sbin/mysqld --skip-grant-tables --user=root

2023-01-13T17:42:00.130718Z 0 [Warning] [MY-010143] [Server] Ignoring user change to 'root' because the user was set to 'mysql' earlier on the command line
2023-01-13T17:42:00.130911Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2023-01-13T17:42:00.131202Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-0ubuntu0.20.04.2) starting as process 11650
2023-01-13T17:42:00.168108Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2023-01-13T17:42:00.168156Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2023-01-13T17:42:00.168910Z 0 [Warning] [MY-010122] [Server] One can only use the --user switch if running as root
2023-01-13T17:42:00.168962Z 0 [ERROR] [MY-013276] [Server] Failed to set datadir to '/var/lib/mysql/' (OS errno: 13 - Permission denied)
2023-01-13T17:42:00.169263Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-01-13T17:42:00.169618Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31-0ubuntu0.20.04.2) (Ubuntu).

my_user@MACCHINA:~/Scrivania$ sudo systemctl start mysql
my_user@MACCHINA:~/Scrivania$ mysql -u root

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

my_user@MACCHINA:~/Scrivania$