Pages : 1
#1 Le 21/04/2008, à 17:46
- Galoula
Mysql fonctionne en root ?!? (Pourquoi ?)
Bonjour,
J'ai un soucis avec mon serveur WEB :
J'ai mysql, et il ne fonction que en root.
En effet dans /etc/mysql/my.cnf
dans mysqld je suis obliger de mètre ca :
user = root
alors que normalement je devrais avoir ca :
user = mysql
dans mon /var/log/daemon.log j'ai ca quand je le met en user = mysql :
Apr 21 17:37:38 Galoula-WEB02L mysqld[14706]: 080421 17:37:38 InnoDB: Started; log sequence number 0 43655
Apr 21 17:37:38 Galoula-WEB02L mysqld[14706]: 080421 17:37:38 [Note] Recovering after a crash using /var/log/mysql/mysql-bin
Apr 21 17:37:38 Galoula-WEB02L mysqld[14706]: 080421 17:37:38 [Note] Starting crash recovery...
Apr 21 17:37:38 Galoula-WEB02L mysqld[14706]: 080421 17:37:38 [Note] Crash recovery finished.
Apr 21 17:37:38 Galoula-WEB02L mysqld[14706]: 080421 17:37:38 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
Apr 21 17:37:38 Galoula-WEB02L mysqld_safe[14718]: ended
Apr 21 17:37:52 Galoula-WEB02L /etc/init.d/mysql[14854]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Apr 21 17:37:52 Galoula-WEB02L /etc/init.d/mysql[14854]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Apr 21 17:37:52 Galoula-WEB02L /etc/init.d/mysql[14854]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Apr 21 17:37:52 Galoula-WEB02L /etc/init.d/mysql[14854]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Apr 21 17:37:52 Galoula-WEB02L /etc/init.d/mysql[14854]:
Apr 21 17:39:12 Galoula-WEB02L mysqld_safe[15071]: started
en root ca marche nikel.
et enfin, les droits sont bien pour mysql en 700.
Pouvez-vous m'éclaircir la chose ?
Car je n'est pas trop confiance en un site avec mysql executer en root !!! (Mais ca dépanne !)
Merci d'avance !
Hors ligne
#2 Le 21/04/2008, à 19:54
- dexinou
Re : Mysql fonctionne en root ?!? (Pourquoi ?)
Salut,
vérifie dans /etc/passwd que le user mysql existe
Non ça marche pas nickel:
Fatal error: Can't open and lock privilege tables: Table 'host' is read only
Apr 21 17:37:38 Galoula-WEB02L mysqld_safe[14718]: ended
Vérifie les droits
Une fois les bons droits appliqués ceci n'apparaîtra plus:
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Ensuite tappe en console:
ps aux | grep mysqld
Et poste la sortie.
Dernière modification par dexinou (Le 21/04/2008, à 20:01)
Ubuntu 9.10 64bits ext4 ® Core 2 Duo
Unix..... il y a moins bien mais c'est plus cher.
Si t'as pas compris la réponse, pose mieux ta question.
Tutoriaux Linux, apache, pure-ftpd, bind, mysql, qmail...
Hors ligne
Pages : 1