Copying issue with mysqldump

↘锁芯ラ 提交于 2019-12-11 21:12:31

问题


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é.

回答1:


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.



来源:https://stackoverflow.com/questions/21238835/copying-issue-with-mysqldump

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!