IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Administration MySQL Discussion :

Accès distant impossible


Sujet :

Administration MySQL

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2012
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Distribution

    Informations forums :
    Inscription : Mars 2012
    Messages : 3
    Points : 1
    Points
    1
    Par défaut Accès distant impossible
    Bonjour à tous,

    J'ai récemment eu comme projet à mon travail d'installer GLPI, et de le coupler avec un OCS Inventory (déjà en place).
    N'étant pas physiquement proche du serveur hebergeant OCS Inventory, je n'ai pas eu moyen d'installer GLPI sur le même serveur.
    Le serveur OCS étant anciennement sous Debian, nous avons autoriser les connexions distantes pour permettre à mon serveur GLPI de venir piocher des infos dans la base SQL. Tout fonctionnait alors parfaitement, je pouvais bien synchroniser mes données.

    Seulement il y a quelques jours, le service informatique gérant le serveur OCS a ré-installer le serveur OCS sur un Windows Server 2003 et là, impossible d'autoriser mon serveur GLPI à se connecter à la base SQL.

    Si vous avez déjà eu des problèmes similaires, ou si vous avez des idées pour résoudre ce problème.

    Ayant déjà fouillé sur la toile, j'ai vu qu'il fallait paramétrer le my.ini, mais pour le moment rien n'y fait... Voilà la configuration de mon my.ini

    # Example MySQL config file for small systems.
    #
    # This is for a system with little memory (<= 64M) where MySQL is only used
    # from time to time and it's important that the mysqld daemon
    # doesn't use much resources.
    #
    # You can copy this file to
    # C:/xampp/mysql/bin/my.cnf to set global options,
    # mysql-data-dir/my.cnf to set server-specific options (in this
    # installation this directory is C:/xampp/mysql/data) or
    # ~/.my.cnf to set user-specific options.
    #
    # In this file, you can use all long options that a program supports.
    # If you want to know which options a program supports, run the program
    # with the "--help" option.
    # The following options will be passed to all MySQL clients
    [client]
    # password = your_password
    port = 3306
    socket = "C:/xampp/mysql/mysql.sock"
    # Here follows entries for some specific programs
    # The MySQL server
    [mysqld]
    port= 3306
    socket= "C:/xampp/mysql/mysql.sock"
    basedir="C:/xampp/mysql"
    tmpdir="C:/xampp/tmp"
    datadir="C:/xampp/mysql/data"
    pid_file="mysql.pid"
    skip-external-locking
    key_buffer = 16M
    max_allowed_packet = 32M
    table_cache = 64
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M
    log_error="mysql_error.log"

    # Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (via the "enable-named-pipe" option) will render mysqld useless!
    #
    # commented in by lampp security
    #skip-networking
    skip-federated
    # Replication Master Server (default)
    # binary logging is required for replication
    # log-bin deactivated by default since XAMPP 1.4.11
    #log-bin=mysql-bin
    # required unique id between 1 and 2^32 - 1
    # defaults to 1 if master-host is not set
    # but will not function as a master if omitted
    server-id = 1
    # Replication Slave (comment out master section to use this)
    #
    # To configure this host as a replication slave, you can choose between
    # two methods :
    #
    # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
    # the syntax is:
    #
    # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
    # MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
    #
    # where you replace <host>, <user>, <password> by quoted strings and
    # <port> by the master's port number (3306 by default).
    #
    # Example:
    #
    # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
    # MASTER_USER='joe', MASTER_PASSWORD='secret';
    #
    # OR
    #
    # 2) Set the variables below. However, in case you choose this method, then
    # start replication for the first time (even unsuccessfully, for example
    # if you mistyped the password in master-password and the slave fails to
    # connect), the slave will create a master.info file, and any later
    # change in this file to the variables' values below will be ignored and
    # overridden by the content of the master.info file, unless you shutdown
    # the slave server, delete master.info and restart the slaver server.
    # For that reason, you may want to leave the lines below untouched
    # (commented) and instead use CHANGE MASTER TO (see above)
    #
    # required unique id between 2 and 2^32 - 1
    # (and different from the master)
    # defaults to 2 if master-host is set
    # but will not function as a slave if omitted
    #server-id = 2
    #
    # The replication master for this slave - required
    #master-host = <hostname>
    #
    # The username the slave will use for authentication when connecting
    # to the master - required
    #master-user = <username>
    #
    # The password the slave will authenticate with when connecting to
    # the master - required
    #master-password = <password>
    #
    # The port the master is listening on.
    # optional - defaults to 3306
    #master-port = <port>
    #
    # binary logging - not required for slaves, but recommended
    #log-bin=mysql-bin

    # Point the following paths to different dedicated disks
    #tmpdir = "C:/xampp/tmp"
    #log-update = /path-to-dedicated-directory/hostname
    # Uncomment the following if you are using BDB tables
    #bdb_cache_size = 4M
    #bdb_max_lock = 10000
    # Comment the following if you are using InnoDB tables
    ## skip-innodb
    innodb_data_home_dir = "C:/xampp/mysql/data"
    innodb_data_file_path = ibdata1:10M:autoextend
    innodb_log_group_home_dir = "C:/xampp/mysql/data"
    #innodb_log_arch_dir = "C:/xampp/mysql/data"
    ## You can set .._buffer_pool_size up to 50 - 80 %
    ## of RAM but beware of setting memory usage too high
    innodb_buffer_pool_size = 16M
    innodb_additional_mem_pool_size = 2M
    ## Set .._log_file_size to 25 % of buffer pool size
    innodb_log_file_size = 5M
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 1
    innodb_lock_wait_timeout = 50
    [mysqldump]
    quick
    max_allowed_packet = 16M
    [mysql]
    no-auto-rehash
    # Remove the next comment character if you are not familiar with SQL
    #safe-updates
    [isamchk]
    key_buffer = 20M
    sort_buffer_size = 20M
    read_buffer = 2M
    write_buffer = 2M
    [myisamchk]
    key_buffer = 20M
    sort_buffer_size = 20M
    read_buffer = 2M
    write_buffer = 2M
    [mysqlhotcopy]
    interactive-timeout

  2. #2
    Membre averti
    Avatar de sweetasnz
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mars 2012
    Messages
    212
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Nouvelle-Zélande

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mars 2012
    Messages : 212
    Points : 375
    Points
    375
    Par défaut
    As-tu un accès à cette machine "Windows Server 2003" en dehors de l'accès à la base ?
    peux-tu te connecter à la base de ton poste distant via mysql.exe par exemple?
    Ton adresse IP est-elle filtrée/ reconnue par le serveur "Windows Server 2003"?
    Le port de la base est-il vraiment 3306 (port par default) ou autre?

  3. #3
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2012
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Distribution

    Informations forums :
    Inscription : Mars 2012
    Messages : 3
    Points : 1
    Points
    1
    Par défaut
    Bonjour,

    Merci pour la réponse rapide.

    Pour répondre aux questions:
    - Oui j'ai bien accès au serveur en Windows 2003 (je peux prendre la main dessus s'il le faut).
    - Non, les personnes gérant le serveur OCS n'était pas capable non plus de se connecter à la base sans se connecter en tant que "localhost", donc depuis le serveur même.
    - Qu'appelles-tu une adresse reconnue?
    - Oui le port est bien le bon.

    Lorsque nous étions sous Linux, nous avions du autoriser un utilisateur sous etc/hosts.allow il me semble bien.

  4. #4
    Membre averti
    Avatar de sweetasnz
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mars 2012
    Messages
    212
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Nouvelle-Zélande

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mars 2012
    Messages : 212
    Points : 375
    Points
    375
    Par défaut
    Citation Envoyé par Cracboom Voir le message
    Lorsque nous étions sous Linux, nous avions du autoriser un utilisateur sous etc/hosts.allow il me semble bien.
    que te renvoie la commande "netstat -a" coté serveur?
    Il faut vérifier les règles de routage et Firewall.

  5. #5
    Membre averti
    Avatar de sweetasnz
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mars 2012
    Messages
    212
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Nouvelle-Zélande

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mars 2012
    Messages : 212
    Points : 375
    Points
    375
    Par défaut
    j'avais jamais fait attention mais apparemment tu ne peux pas te connecter en "root" autrement qu'en localhost si tu n'a pas spécifier de mot de passe.

    Je viens de tester sur ma station avec un compte utilisateur basique :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    > .\mysql.exe --user=toto --host=ma_station ma_base
    ERROR 1045 (28000) : Access denied for user 'toto'@'ma_station' (using password NO)
    par contre si je spécifie le password, là, je me connecte sans problème
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    > .\mysql.exe --user=toto --password=titi --host=ma_station ma_base
    Your MySQL connection ....
    SQL>
    avec root:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    > .\mysql.exe --user=root  ma_base --host=ma_station
    ERROR 1045 (28000) : Access denied for user 'root'@'ma_station' (using password NO)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    > .\mysql.exe --user=root  ma_base --host=localhost
    Your MySQL connection ....
    SQL>

  6. #6
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2012
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Distribution

    Informations forums :
    Inscription : Mars 2012
    Messages : 3
    Points : 1
    Points
    1
    Par défaut
    C'est compliqué pour moi de te montrer mon netstat -a, y a-t'il une info que tu cherches précisément dedans?

    Je viens d'essayer de rentrer cette ligne de commande dans mon my.ini :
    address-bind = xxx.xx.xx.xxx
    Lorsque je redémarre mon Apache il refuse de le lancer, et si je vais voir dans le moniteur d'evenement, j'ai 3 messages qui apparaissent :
    - Un qui me demande: Do you already have another mysqld server running on port: 3306?
    - Un qui me dit: Can't start server: Bind on TCP/IP port: No such file or directory
    - Et le 3ème qui me dit simplement : aborting

    Je ne sais plus si je l'ai précisé, mais la base sql d'OCS est hébergé sur un Windows server 2003 avec un interface xamp alors que la base sql de GLPI est installé sur une Ubuntu Server.

  7. #7
    Membre averti
    Avatar de sweetasnz
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mars 2012
    Messages
    212
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Nouvelle-Zélande

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mars 2012
    Messages : 212
    Points : 375
    Points
    375
    Par défaut
    Citation Envoyé par Cracboom Voir le message
    Seulement il y a quelques jours, le service informatique gérant le serveur OCS a ré-installer le serveur OCS sur un Windows Server 2003 et là, impossible d'autoriser mon serveur GLPI à se connecter à la base SQL.
    netstat : quel est l'état ton port 3306 sur les 2 stations ?

    je pense à quelque chose : dans la configuration précédente coté serveur OCS,
    la base était-elle en écoute sur le port 3306 ou un autre (ex 3307)?
    Lorsqu'ils ont fait la ré-install quel port ont-ils utilisé?
    Bref, as-tu essayer d'installer ta base sur un port différent que celui par défaut.
    Je ne suis pas certains mais peut-être que le fait d'avoir 2 MySQL sur 2 stations communicantes et écoutants sur le même port (3306) peut être à l'origine de ton pb. Essaie de fouiller de ce coté en installant ta base sur un port comme 3307 et tester si tu constates la même erreur.

Discussions similaires

  1. Accés FTP impossible à un poste distant
    Par nadhem13 dans le forum Sécurité
    Réponses: 0
    Dernier message: 08/11/2012, 10h22
  2. Accès distant impossible après mise à jour de MySQL sur Debian
    Par Darkroxor dans le forum Administration
    Réponses: 6
    Dernier message: 14/10/2012, 18h09
  3. [10g](redhat6.2) accès distant par FTP depuis client java impossible
    Par olivier57b dans le forum Connexions aux bases de données
    Réponses: 3
    Dernier message: 02/02/2012, 00h04
  4. Réponses: 9
    Dernier message: 12/09/2007, 23h25
  5. Accés XLMRAD impossible
    Par Pierre63 dans le forum XMLRAD
    Réponses: 9
    Dernier message: 24/07/2003, 15h06

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo