MySQL Git Bash winpty mysqldump stdout is not a tty and stdin is not a tty
<p>Please help with MySQL Git Bash winpty mysqldump. "winpty mysqldump" is not working in Git Bash. Here the details of the error:</p>

<p><strong>Git Bash</strong></p>

<pre><code>$ winpty mysqldump -u root -p employeedb &gt; "E:\Working\SQL\MySQL\MySQL-Queries\mysqldump\SQL-dump\employeedb_backup.sql"
stdout is not a tty

$ winpty mysql -u root -p employeedb &lt; "E:\Working\SQL\MySQL\MySQL-Queries\mysqldump\SQL-dump\employeedb_backup.sql"
stdin is not a tty
</code></pre>

<p>However Git CMD works fine:</p>

<p><strong>Git CMD</strong></p>

<pre><code>C:\Users\Aspire&gt;mysqldump -u root -p employeedb &gt; "E:\Working\SQL\MySQL\MySQL-Queries\mysqldump\SQL-dump\employeedb_backup.sql"
Enter password: ****************

C:\Users\Aspire&gt;mysql -u root -p employeedb &lt; "E:\Working\SQL\MySQL\MySQL-Queries\mysqldump\SQL-dump\employeedb_backup.sql"
Enter password: ****************
</code></pre>

<p><strong>Git Bash works with winpty mysqldump and winpty mysql without ">" and "&lt;"</strong>  </p>

<pre><code>$ winpty mysqldump -u root -p employeedb

Enter password: ****************
-- MySQL dump 10.13  Distrib 5.7.14, for Win64 (x86_64)
--
-- Host: localhost    Database: employeedb
-- ------------------------------------------------------
-- Server version       5.7.14-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 `employee`
--

DROP TABLE IF EXISTS `employee`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `employee` (
  `ID` int(11) DEFAULT NULL,
  `Name` varchar(50) DEFAULT NULL,
  `Salary` decimal(15,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `employee`
--

LOCK TABLES `employee` WRITE;
/*!40000 ALTER TABLE `employee` DISABLE KEYS */;
INSERT INTO `employee` VALUES (1,'A',10000.00),(2,'B',8000.00),(3,'C',8000.00),(4,'D',6000.00),(5,'E',6000.00),(6,'F',6000.00),(7,'G',5000.00),(8,'H',5000.00),(9,'I',5000.00),(10,'
J',5000.00),(11,'K',4000.00),(12,'L',4000.00),(13,'M',3000.00),(14,'N',3000.00),(15,'O',1000.00),(16,'P',14000.00),(17,'Q',14000.00),(18,'R',12000.00),(19,'S',12000.00),(20,'T',160
00.00),(21,'U',16000.00),(22,'V',16000.00),(23,'W',14000.00),(24,'X',12000.00),(25,'Y',12000.00),(26,'Z',10000.00);
/*!40000 ALTER TABLE `employee` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2016-11-18 20:43:00
</code></pre>

<p>Please help with winpty mysqldump/winpty mysql and stdout/stdin tty?</p>

<p><strong>Git Bash "mysqldump" without winpty does not work:</strong></p>

<p>The command $ mysqldump -u root -p employeedb > "E:\Working\SQL\MySQL\MySQL-Queries\mysqldump\SQL-dump\employeedb_backup.sql" just freezes.</p>

<p>Please refer to the "employeedb_backup.sql" script size 0 KB.</p>

<p><a href="https://i.stack.imgur.com/C5d1S.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/C5d1S.jpg" alt="enter image description here"></a></p>

<p>Thanks</p>