mysqldump -uroot -p test 可以连接上
mysqldump -uroot -p test_db > D:\backup 拒绝访问
backup 文件夹属性已经调整为 everyone完全控制了

解决方案 »

  1.   


    你在服务里看看你的mysql服务的启动账号是什么?
      

  2.   


    这个是我最近用的命令,你可以参考一下:
    C:\Users\Administrator>cd C:\Program Files\MySQL\MySQL Server 5.6\binC:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump -uroot -pwww -P3306 world > c:\tb2.txt
    Warning: Using a password on the command line interface can be insecure.C:\Program Files\MySQL\MySQL Server 5.6\bin>cd c:\c:\>more tb2.txt
    -- MySQL dump 10.13  Distrib 5.6.25, for Win64 (x86_64)
    --
    -- Host: localhost    Database: world
    -- ------------------------------------------------------
    -- Server version       5.6.25-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 */;--
    -- Table structure for table `author`
    --DROP TABLE IF EXISTS `author`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    -- More (0%) --
    --导出world数据库的tb2表的结构和数据
    c:\>mysqldump -uroot -pwin@channel -P3306 world tb2 > c:\tb2.txt
    Warning: Using a password on the command line interface can be insecure.c:\>
      

  3.   

    楼主你好
            首先尝试c:> mysql -uroot -p123456
    如果可以正常进入Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 7
    Server version: 5.1.58-community MySQL Community Server (GPL)Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL v2 licenseType 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>可以正常进入!尝试数据库连接mysqldump -uroot -p123456 test如果这个也可以 大部分的问题 可能是你对你要输出文件夹没有写的权限