Aide avec Mysql (Can't connect to local MySQL server through socket)

Aide avec Mysql (Can't connect to local MySQL server through socket) - réseaux et sécurité - Linux et OS Alternatifs

Marsh Posté le 04-09-2007 à 05:56:22    

Bonjour
 
J'ai un serveur sous ubuntu 6.06 lamp version avec apache et php qui fonctionne correctement.
Par contre j'ai encore jamais réussi a faire fonctionner Mysql.
 
alors jai installé mysql avec apt-get install mysql-server mysql-client libmysqlclient12-dev  
et quelque semaine plus tard je me suis decider a commencer a configurer/utiliser la base de donné mais  
je tombe sur une erreur lorsque jesseille de starté mysql  
 
voici mon erreur.
 
root@Termina:~# /etc/init.d/mysql start
Starting MySQL database server: mysqld.
.
.
.
.
.
.
.
.
.
.
.
.
.
...failed or took more than 6s.
        Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
root@Termina:~# Can't connect to local MySQL server through socket
 
 
 
J'ai regardé et le fichier sock n'est pas la!
S.v.p aidé moi, je suis debutant a linux.
Merci pour votre aide.

Reply

Marsh Posté le 04-09-2007 à 05:56:22   

Reply

Marsh Posté le 04-09-2007 à 11:13:12    

T'as pas des infos dans le syslog ?


---------------
--
Reply

Marsh Posté le 04-09-2007 à 14:41:19    

leto a écrit :

T'as pas des infos dans le syslog ?


 
root@Termina:~# vi /var/log/syslog
Aug 17 17:19:31 Termina syslogd 1.4.1#17ubuntu7: restart.
Aug 17 17:19:31 Termina kernel: Inspecting /boot/System.map-2.6.15-26-server
Aug 17 17:19:31 Termina kernel: Loaded 23234 symbols from /boot/System.map-2.6.15-26-server.
Aug 17 17:19:31 Termina kernel: Symbols match kernel version 2.6.15.
Aug 17 17:19:31 Termina kernel: No module symbols loaded - kernel modules not enabled.
Aug 17 17:19:31 Termina kernel: [42949372.960000] Linux version 2.6.15-26-server (buildd@terranova) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #1 SMP Thu Aug 3 04:09:15 UTC 2006
Aug 17 17:19:31 Termina kernel: [42949372.960000] BIOS-provided physical RAM map:
Aug 17 17:19:31 Termina kernel: [42949372.960000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
Aug 17 17:19:31 Termina kernel: [42949372.960000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
Aug 17 17:19:31 Termina kernel: [42949372.960000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
Aug 17 17:19:31 Termina kernel: [42949372.960000]  BIOS-e820: 0000000000100000 - 000000001fee0000 (usable)
Aug 17 17:19:31 Termina kernel: [42949372.960000]  BIOS-e820: 000000001fef0000 - 000000001fef8000 (ACPI data)

Reply

Marsh Posté le 05-09-2007 à 00:09:20    

Personne pourait m'aider?  
s.v.p.

Reply

Marsh Posté le 05-09-2007 à 09:46:20    

lance la commande :
tail -f /var/log/syslog
 
Puis essaie de démarrer mysql. La t'auras des parties pertinentes du syslog. Ce que tu donne plus haut n'a pas trop de rapport.


---------------
--
Reply

Marsh Posté le 05-09-2007 à 18:51:18    

leto a écrit :

lance la commande :
tail -f /var/log/syslog
 
Puis essaie de démarrer mysql. La t'auras des parties pertinentes du syslog. Ce que tu donne plus haut n'a pas trop de rapport.


 
 
 
 
 
 
root@Termina:~# tail -f /var/log/syslog
Sep  5 12:42:45 termina mysqld[4411]: 070905 12:42:45 [ERROR] Aborting
Sep  5 12:42:45 termina mysqld[4411]:
Sep  5 12:42:45 termina mysqld[4411]: 070905 12:42:45 [Note] /usr/sbin/mysqld: Shutdown complete
Sep  5 12:42:45 termina mysqld[4411]:
Sep  5 12:42:45 termina mysqld_safe[4413]: ended
Sep  5 12:43:00 termina /etc/init.d/mysql[4548]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Sep  5 12:43:00 termina /etc/init.d/mysql[4548]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Sep  5 12:43:00 termina /etc/init.d/mysql[4548]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Sep  5 12:43:00 termina /etc/init.d/mysql[4548]: Check that mysqld is running an d that the socket: '/var/run/mysqld/mysqld.sock' exists!
Sep  5 12:43:00 termina /etc/init.d/mysql[4548]:
 
 
Ensuite j'ai starter mysql -  error 2002, et la jai fait vi /var/log/syslog  et je voyais que des trucs similaire a mon premier post.
 Par la suite jai refaite tail -f /var/log/syslog et sa me donne le meme resultat que plus haut.
 
 
Je ne sais pas si le log peut aider.
 
Merci


Message édité par starbuck888 le 05-09-2007 à 18:54:17
Reply

Marsh Posté le 06-09-2007 à 11:13:52    

Donne le contenu de ton fichier de configuration de mysql aussi, ça peut aider.
Après je ne suis pas un expert, mais avec ces infos qqun pourra surement t'aider =)


---------------
--
Reply

Marsh Posté le 06-09-2007 à 12:42:06    

leto a écrit :

Donne le contenu de ton fichier de configuration de mysql aussi, ça peut aider.
Après je ne suis pas un expert, mais avec ces infos qqun pourra surement t'aider =)


 
voila!
 
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "/var/lib/mysql/my.cnf" to set server-specific options or
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/ [...] ables.html
 
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
 
 
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
 
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0
 
[mysqld]
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking
 
# For compatibility to other Debian packages that still use
# libmysqlclient10 and libmysqlclient12.
old_passwords   = 1
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address           = 127.0.0.1
#
# * Fine Tuning
#
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 128K
#
# * Query Cache Configuration
#
query_cache_limit       = 1048576
query_cache_size        = 16777216
query_cache_type        = 1
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
 
# Be aware that this log type is a performance killer.
#log            = /var/log/mysql.log
#log            = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log-slow-queries       = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication.
#server-id              = 1
log-bin                 = /var/log/mysql/mysql-bin.log
expire-logs-days        = 20
max_binlog_size         = 104857600
#binlog-do-db           = include_database_name
#binlog-ignore-db       = include_database_name
#
# * BerkeleyDB
#
# According to an MySQL employee the use of BerkeleyDB is now discouraged
# and support for it will probably cease in the next versions.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# If you want to enable SSL support (recommended) read the manual or my
# HOWTO in /usr/share/doc/mysql-server/SSL-MINI-HOWTO.txt.gz
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
 
[mysqldump]
quick
quote-names
max_allowed_packet      = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
 
[isamchk]
key_buffer              = 16M
 
#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the ndbd storage daemons,
# not from the ndb_mgmd management daemon.
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1
 
 
 
 
 
 
 
 
 
 

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed