Dunque credo di aver risolto e vi illustro come, così può essere utile ad altri in futuro nel caso.
Il problema è che l'utente root non esiste proprio nella tabella user del database mysql.
Quindi l'ho dovuto creare io.
Per poterlo fare ho messo nel file /etc/my.cnf la seguente riga.
"skip-grant-tables"
Come potete vedere qui sotto è in "[mysqld]"
-------------------------------------------
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
skip-grant-tables
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
-------------------------------------------
Perché da shell poi mi dava comunque errore:
-------------------------------------------
root@localhost roberto]# /etc/init.d/mysqld start --skip-grant-tables
Avvio di MySQL: [ OK ]
[root@localhost roberto]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
-------------------------------------------
Dopo aver aggiunto quella riga ho creato l'utente a mano:
-------------------------------------------
[root@localhost roberto]# /etc/init.d/mysqld start
Avvio di MySQL: [ OK ]
[root@localhost roberto]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.51a Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> INSERT INTO user VALUES('%','root',PASSWORD('laTuaPassoword'),'Y',' Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y' ,'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',' ','','','',0,0,0,0);
Query OK, 1 row affected (0.00 sec)
-------------------------------------------
Poi ho rimosso la riga nel file /etc/my.cnf e ho fatto ripartire il server.

Rispondi quotando