Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 06/06/2009, à 23:55

green

Probleme avec mon fichier my.cnf

Bonjour à tous.

Je suis actuellement en plein projet, mettre en fonctionnement ocs inventory sur ubuntu. J'ai trouvé un tuto d'enfer que je suis à la lettre http://glpi-project.org/wiki/doku.php?i … ntuhardyvm

Je suis actuellement au chapitre 5.2.Serveur de Bases de Données MySQL, à partir du moment ou j'ai modifier le le fichier my.cnf, j'ai le probleme suivant

Au démarrage ou redemarrage du mysql j'ai cela qui s affiche:

nessa@nessa-corp:~$ sudo /etc/init.d/mysql restart
[sudo] password for nessa:
* Stopping MySQL database server mysqld                                        Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
                                                                         [ OK ]
Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
* Starting MySQL database server mysqld                                        Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
                                                                         [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.

Je sens déjà la réponce arrivé c'est un probleme de droit voici le résulta de mon ls -l

nessa@nessa-corp:/etc/mysql$ ls -l
total 16
drwxr-xr-x 2 root root 4096 2009-06-06 01:32 conf.d
-rw------- 1 root root  312 2009-06-06 01:32 debian.cnf
-rwxr-xr-x 1 root root 1198 2008-11-14 20:16 debian-start
-rwxrwxrwx 1 root root 3896 2009-06-06 23:16 my.cnf

afin que vous puissiez m'aider voici le contenu de mon fichier my.cnf

# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.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/server-system-variables.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
#
#
# * IMPORTANT
#   If you make changes to these settings and your system uses apparmor, you may
#   also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#

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
#
# 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
thread_cache_size       = 8

#table_cache            = 64
#thread_concurrency     = 10
#max_connections        =100
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#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
#long_query_time = 2
#log-queries-not-using-indexes

#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id              = 1
#log_bin                        = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
max_binlog_size         = 100M
#binlog_do_db           = include_database_name
#binlog_ignore_db       = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
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!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# 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 NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

J'espere vraiement que quelqu'un aura le courage de lien mon post jusqu'au bout. Merci par avance à toutes les personnes qui voudront bien me donner un peut de leur temps.

@++

Hors ligne

#2 Le 07/06/2009, à 00:40

hardball

Re : Probleme avec mon fichier my.cnf

un petit

sudo chmod 0644 /etc/mysql/my.cnf

-- Toshiba satelliteA100-335 + Ubuntu Jaunty --
Pour les noobs : Bienvenue ! ici la perséverance vous récompense.
Pour les anciens : Merci à vous de partager votre savoir.
Et vive le perl !

Hors ligne

#3 Le 07/06/2009, à 09:17

green

Re : Probleme avec mon fichier my.cnf

Bonjour,

Merci hardball pour ta réponse, j'ai ta commande. Maintenant je n'ai plus le message Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
A présent j'ai cela:

nessa@nessa-corp:/etc/mysql$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld                                 [ OK ]
* Starting MySQL database server mysqld                                 [fail]
nessa@nessa-corp:/etc/mysql$ sudo mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Encore merci a vous

Hors ligne

#4 Le 07/06/2009, à 20:39

hardball

Re : Probleme avec mon fichier my.cnf

et que te retourne la commande suivante ?

 sudo cat /etc/mysql/debian.cnf

-- Toshiba satelliteA100-335 + Ubuntu Jaunty --
Pour les noobs : Bienvenue ! ici la perséverance vous récompense.
Pour les anciens : Merci à vous de partager votre savoir.
Et vive le perl !

Hors ligne

#5 Le 07/06/2009, à 22:49

green

Re : Probleme avec mon fichier my.cnf

Bonjour, ca me retourne cela

nessa@nessa-corp:/etc/mysql$ sudo cat /etc/mysql/debian.cnf
[sudo] password for nessa:
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = 9YbtUBqb8ZR9Z1UO
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user     = debian-sys-maint
password = 9YbtUBqb8ZR9Z1UO
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

Merci de ton aide

Hors ligne

#6 Le 07/06/2009, à 23:18

hardball

Re : Probleme avec mon fichier my.cnf

et pour cette commande ?

 ls -l /var/run/

et pour info la ligne

bind_address = 127.0.0.1

n'est pas mise en remarque dans ton fichier my.cnf

Dernière modification par hardball (Le 07/06/2009, à 23:21)


-- Toshiba satelliteA100-335 + Ubuntu Jaunty --
Pour les noobs : Bienvenue ! ici la perséverance vous récompense.
Pour les anciens : Merci à vous de partager votre savoir.
Et vive le perl !

Hors ligne

#7 Le 07/06/2009, à 23:33

green

Re : Probleme avec mon fichier my.cnf

Bonsoir, pour ta premiere commande voila le resultat.

nessa@nessa-corp:/etc/mysql$ ls -l /var/run/
total 56
srw-rw-rw- 1 root       root          0 2009-06-06 01:51 acpid.socket
drwxr-xr-x 2 root       root         40 2009-06-06 01:51 apache2
-rw-r--r-- 1 root       root          5 2009-06-07 07:46 apache2.pid
-rw-r--r-- 1 root       root          5 2009-06-06 01:51 atd.pid
drwxr-xr-x 2 avahi      avahi       100 2009-06-06 01:51 avahi-daemon
-r-------- 1 root       root         76 2009-06-06 01:51 bluetoothd_address
drwxr-xr-x 2 root       root         60 2009-06-06 01:52 console
-rw-r--r-- 1 root       root          5 2009-06-06 01:51 console-kit-daemon.pid
-rw-r--r-- 1 root       root          5 2009-06-06 01:51 crond.pid
---------- 1 root       root          0 2009-06-06 01:51 crond.reboot
drwxr-xr-x 3 root       lp          120 2009-06-06 02:12 cups
drwxr-xr-x 2 messagebus messagebus   80 2009-06-06 01:51 dbus
-rw-r--r-- 1 root       root          4 2009-06-06 01:51 dhcdbd.pid
-rw-r--r-- 1 root       root          5 2009-06-06 01:51 dhclient.eth0.pid
-rw-r--r-- 1 root       root          5 2009-06-06 01:51 gdm.pid
srw-rw-rw- 1 root       root          0 2009-06-06 01:51 gdm_socket
drwxr-xr-x 2 haldaemon  haldaemon    80 2009-06-06 01:52 hald
drwxr-xr-x 2 klog       klog        100 2009-06-06 01:51 klogd
-rw-r--r-- 1 root       root        422 2009-06-06 01:51 motd
drwxr-xr-x 2 mysql      root         40 2009-06-07 09:13 mysqld
drwxr-xr-x 2 root       root         60 2009-06-06 01:51 network
drwxr-xr-x 2 root       root         80 2009-06-06 01:51 NetworkManager
drwxrwxr-x 2 polkituser polkituser   40 2009-06-06 01:51 PolicyKit
drwxr-xr-x 2 root       root         40 2009-06-06 01:51 pppconfig
drwxrwxr-x 2 root       utmp         40 2009-06-06 01:51 screen
srw-rw-rw- 1 root       root          0 2009-06-06 01:51 sdp
-rw-r--r-- 1 root       root          2 2009-06-06 01:51 sendsigs.omit
drwxr-xr-x 2 root       root         40 2009-06-06 01:51 sendsigs.omit.d
drwx------ 3 root       nessa        60 2009-06-06 19:32 sudo
-rw-r--r-- 1 root       root          5 2009-06-06 01:51 syslogd.pid
---S---r-T 1 root       root          4 2009-06-06 01:51 system-tools-backends.pid
-rw-rw-r-- 1 root       utmp       3840 2009-06-06 23:51 utmp
-rw-r--r-- 1 root       root          5 2009-06-06 01:51 xinetd.pid

Pour ta second remarque je vais el faire de suite, par contre est ce que tu peux me dire comment je peux faire le # quand je suis en VI?

Encore merci

Hors ligne

#8 Le 07/06/2009, à 23:48

hardball

Re : Probleme avec mon fichier my.cnf

bon je vois pas trop pourquoi tu as ce message ?

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock

tes fichiers de conf ont l'air valide, le chemin existe, et les droits sont bons.

N'as tu rien changé d'autre par rapport au tuto ?

pour mettre en remarque sous vi :
touche esc
touche i
touche #
touche :wq


-- Toshiba satelliteA100-335 + Ubuntu Jaunty --
Pour les noobs : Bienvenue ! ici la perséverance vous récompense.
Pour les anciens : Merci à vous de partager votre savoir.
Et vive le perl !

Hors ligne

#9 Le 08/06/2009, à 00:05

green

Re : Probleme avec mon fichier my.cnf

non je n'ai rien changé. cependant mon mysql fonctionnait avant que je modifie les droits et son contenu.
J'aimerai avoir le fichier de conf par defaut, mais je ne sais pas comment faire.

Encore Merci

Hors ligne

#10 Le 08/06/2009, à 00:17

green

Re : Probleme avec mon fichier my.cnf

je viens de penser a un truc, il n'y a pas une autre commande pour lancer un autre service, processuce ou dependance?

Hors ligne

#11 Le 08/06/2009, à 08:21

green

Re : Probleme avec mon fichier my.cnf

Bon j'ai modifier le my.cnf en mettant en remarque le bind_address = 127.0.0.1

donc maintenant quans je fais un restart de mon mysql j'ai cela:

nessa@nessa-corp:/etc/mysql$ sudo /etc/init.d/mysql restart
 * Stopping MySQL database server mysqld                                 [ OK ] 
 * Starting MySQL database server mysqld                                 [ OK ] 
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

Quand pensez vous?

Hors ligne