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 :

don't receive any error unless no right to do backup


Sujet :

Administration MySQL

  1. #1
    Futur Membre du Club
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Juin 2010
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Administrateur de base de données

    Informations forums :
    Inscription : Juin 2010
    Messages : 9
    Points : 6
    Points
    6
    Par défaut don't receive any error unless no right to do backup
    Hi everybody,

    I'm newbie in MySQL unless I'm DBA on DB2, SYBASE IQ, ORACLE...
    I'm testing mysqldump to backup my mysql databases.
    I'm working with "5.6.10 MySQL Community Server (GPL)" and with "MySQL dump 10.13 Distrib 5.6.10, for linux-glibc2.5 (x86_64)"

    I've create a mysql user which name is backupdb@localhost.
    I've the password in a /root/.my.cnf file to hide the password :
    [mysqldump]
    user = backupdb
    host = localhost
    password = xxxx

    The user has only those privileges :
    GRANT USAGE ON *.* TO 'backupdb'@'localhost'

    So I'm testing the return code of the mysqldump in order to cath it.

    I'm doing this to do backup :
    /usr/local/mysql/bin/mysqldump --opt --quick --max_allowed_packet=64M --protocol=SOCKET --socket=/data/mysql-datadir/instance-dev.sock --all-databases
    which return 0 and this output :
    -- MySQL dump 10.13 Distrib 5.6.10, for linux-glibc2.5 (x86_64)
    --
    -- Host: localhost Database:
    -- ------------------------------------------------------
    -- Server version 5.6.10

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

    /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
    /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
    /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

    -- Dump completed on 2013-06-12 10:21:57

    Has someone an explication ?
    Why don't I receive a RC=2 ?

    Bruno

  2. #2
    Rédacteur

    Avatar de SQLpro
    Homme Profil pro
    Expert bases de données / SQL / MS SQL Server / Postgresql
    Inscrit en
    Mai 2002
    Messages
    21 779
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Expert bases de données / SQL / MS SQL Server / Postgresql
    Secteur : Conseil

    Informations forums :
    Inscription : Mai 2002
    Messages : 21 779
    Points : 52 756
    Points
    52 756
    Billets dans le blog
    5
    Par défaut
    VOUS ÊTES SUR UN FORUM FRANÇAIS ET VOUS DEVEZ DONC PARLER FRANÇAIS.

    MERCI !
    Frédéric Brouard - SQLpro - ARCHITECTE DE DONNÉES - expert SGBDR et langage SQL
    Le site sur les SGBD relationnels et le langage SQL: http://sqlpro.developpez.com/
    Blog SQL, SQL Server, SGBDR : http://blog.developpez.com/sqlpro
    Expert Microsoft SQL Server - M.V.P. (Most valuable Professional) MS Corp.
    Entreprise SQL SPOT : modélisation, conseils, audit, optimisation, formation...
    * * * * * Expertise SQL Server : http://mssqlserver.fr/ * * * * *

  3. #3
    Futur Membre du Club
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Juin 2010
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Administrateur de base de données

    Informations forums :
    Inscription : Juin 2010
    Messages : 9
    Points : 6
    Points
    6
    Par défaut
    Bonjour tout le monde,

    Je suis un petit nouveau sur MySQL.
    Je suis en train de tester la commande mysqldump pour sauvegarder mes base mySQL.
    Je travaille avec la version "5.6.10 MySQL Community Server (GPL)" et le composant "MySQL dump 10.13 Distrib 5.6.10, for linux-glibc2.5 (x86_64)"

    J'ai créé un utilisateur qui s'appelle backupdb@localhost.
    J'ai mis le mot de passe dans un fichier /root/.my.cnf pour masquer le mdp :
    [mysqldump]
    user = backupdb
    host = localhost
    password = xxxx

    L'utilisateur a les droits suivants :
    GRANT USAGE ON *.* TO 'backupdb'@'localhost'

    Je teste le code retour de la commande mysqldump pour être sûr de ne pas avoir de surprise.

    Voici de que je fait :
    /usr/local/mysql/bin/mysqldump --opt --quick --max_allowed_packet=64M --protocol=SOCKET --socket=/data/mysql-datadir/instance-dev.sock --all-databases
    je récupère un code retour 0 et cette sortie :
    -- MySQL dump 10.13 Distrib 5.6.10, for linux-glibc2.5 (x86_64)
    --
    -- Host: localhost Database:
    -- ------------------------------------------------------
    -- Server version 5.6.10

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

    /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
    /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
    /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

    -- Dump completed on 2013-06-12 10:21:57

    Est-ce que qqn à une explication ?
    Pourquoi n'ai-je pas reçu un RC=2 ?

    Bruno

Discussions similaires

  1. Réponses: 0
    Dernier message: 17/05/2010, 17h48
  2. The program 'firefox' received an X Window System error.
    Par deny dans le forum Mandriva / Mageia
    Réponses: 4
    Dernier message: 02/05/2009, 17h45
  3. ORA-19511 Error received from media manager layer
    Par pierho dans le forum Administration
    Réponses: 1
    Dernier message: 11/07/2008, 08h39
  4. Réponses: 1
    Dernier message: 08/07/2008, 08h01
  5. Réponses: 7
    Dernier message: 07/08/2007, 14h41

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