We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

MYSQL, Mysqldump didnt restore from backups file but "MySQL Administrator GUI" does

motioneye
motioneye asked
on
Medium Priority
668 Views
Last Modified: 2012-06-27
I did try multiple times to restore database from command line, but never get data being restored. but when I use GUI "MySQL Administrator GUI" it took me 5 minutes to complete restoration with success, can someone tel me why ? The way I did is create the database - create table shoe - restore old data from  backup set FFTS.sql, but didnt work


C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqldump -u root -p FFTS <F:\FFTS.sql
Enter password: ***********
-- MySQL dump 10.13  Distrib 5.1.29-rc, for Win32 (ia32)
--
-- Host: localhost    Database: FFTS
-- ------------------------------------------------------
-- Server version       5.1.29-rc-community

/*!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 `shoe`
--

DROP TABLE IF EXISTS `shoe`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `shoe` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `Size` varchar(45) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `shoe`
--

LOCK TABLES `shoe` WRITE;
/*!40000 ALTER TABLE `shoe` DISABLE KEYS */;
/*!40000 ALTER TABLE `shoe` 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 2009-02-18  8:31:56
Comment
Watch Question

CERTIFIED EXPERT
Commented:
mysqldump is not a nool for restore but for export
try mysql instead... (but check syntaxes in doc or use mysql --help)
HTH
i

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
I thought that

mysqldump -u root -p FFTS <F:\FFTS.sql -- this for restore whereas

mysqldump -u root -p FFTS >F:\FFTS.sql -- this for backups
CERTIFIED EXPERT
Commented:
OK, to restore the last full backup which is just a set of SQL statements:


shell> mysql < backup.sql

Open in new window

Commented:
use this


mysql -p -h DBSERVER dbname < dbname.sql

replace dbname.sql with your dumpfile name
replace DBSERVER with your host name
replce dbname with your database name


and tell me if this worked for you or what ?
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.