我正在尝试复制我的数据库但是我收到了这个错误:
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>
当我尝试将其复制到文件中时,我收到了错误:
C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump -uroot -p -d pagesjaunes > database.sql;
Accès refusé.
答案 0 :(得分: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
好吧,也许您应该请求转储数据库pagesjaunes
而不是pagesjaunes;
然后 - 丢弃分号。复制请求也是如此 - shell不喜欢分号,它们不是编程语言。