Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/05/2011, 07:44
Geovanny0401
 
Fecha de Ingreso: diciembre-2009
Mensajes: 137
Antigüedad: 15 años, 3 meses
Puntos: 4
Pregunta Copia de Seguridad

amigos del foro tengo el sgte problema

estoy realizando en mi proyecto una copia de seguridad de la base de dato que esta montada en
Código HTML:
Mysql
desde vb .net, cuando la estoy ejecutando desde el lenguaje me funciona a la maravilla, este es mi codigo
Código:
Try
            Dim txtUsr As String = "root"
            Dim txtPWD As String = "root"
            Dim txtHost As String = "localhost"
            Dim txtPort As String = "3306"
            Dim txtBase As String = "rslapaz"
            Dim txtDir As String = Application.StartupPath & "\Copias"
            Dim txtFN As String = txtDir & "\" & Date.Now.ToString("yyyyMMdd") & ".sql"
            CrearDirectorio(txtDir)
            Dim Res As String = "cmd /C mysqldump.exe -h" & txtHost & " -u" & txtUsr & " -p" & txtPWD & " -P" & txtPort & " " & txtBase & ">" & txtFN

            Shell(Res, AppWinStyle.Hide, True)
            MsgBox("Backup con exito")
        Catch ex As Exception
            MsgBox("ERROR: " & ex.Message)
        End Try
probe la instrucion por medio de consola
Código:
 mysqldump.exe -uroot -proot -hlocalhost -P3306 nombredebase > copia1.sql
y tambien funciona. pero el problema es cuando creo el instalador del proyecto no realiza el proceso de copia. Me genera esto nada mas
Código:
-- MySQL dump 10.13  Distrib 5.1.56, for Win64 (unknown)
--
-- Host: localhost    Database: RSLAPAZ
-- ------------------------------------------------------
-- Server version	5.1.56-community

/*!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 */;
y para fregar me crea un archivo sin extension en
Código HTML:
C:
llamado archivo.

la verdad es que nos donde esta el error para ver quien me puede ayudar