0

i'm trying to copy my databes but i got this error:

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump  -uroot -p -d pagesjaunes;
Enter password:
-- MySQL dump 10.13  Distrib 5.6.15, for Win32 (x86)
--
-- Host: localhost    Database: pagesjaunes;
-- ------------------------------------------------------
-- Server version       5.6.15-log

/*!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 */;
mysqldump: Got error: 1049: Unknown database 'pagesjaunes;' when selecting the database

C:\Program Files\MySQL\MySQL Server 5.6\bin>

Also i got error when i try to copy it into a file :

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump  -uroot -p -d pagesjaunes > database.sql;
Accès refusé.
Niels Keurentjes
  • 41,402
  • 9
  • 98
  • 136
Hayi
  • 6,972
  • 26
  • 80
  • 139

1 Answers1

2
C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump  -uroot -p -d pagesjaunes;
mysqldump: Got error: 1049: Unknown database 'pagesjaunes;' 
                            when selecting the database

Well, perhaps you should request a dump of database pagesjaunes instead of pagesjaunes; then - ditch the semicolon. Same goes for the copy request - shells don't like semicolons, they're not programming languages.

Niels Keurentjes
  • 41,402
  • 9
  • 98
  • 136
  • thanks @NielsKeurentjes `C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump -uroot -p -d pagesjaunes` without semicolon `;` work now :) – Hayi Jan 20 '14 at 16:21
  • but still the other issue `C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump -uroot -p -d pagesjaunes > database.sql; Accès refusé.` – Hayi Jan 20 '14 at 16:22
  • 1
    Again the semicolon? :) Or you might not have permissions to write under ``C:\Program Files`` (point to a file somewhere else). – lipanski Jan 20 '14 at 16:24
  • right both semicolon and permission, u point other file and drop `;` and it's work ;) thanks very much @lipanski – Hayi Jan 20 '14 at 16:28