Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to restore this database with my sql file I have...yet just get this output with it not importing anything into my db. Thoughts?

[root@domU-12-31-39-0B-06-AA data]# mysqldump --host=localhost --password=abc1234 --    user=root --single-transaction blink10 < /data/tt.sql
-- MySQL dump 10.13  Distrib 5.1.52, for redhat-linux-gnu (x86_64)
--
-- Host: localhost    Database: blink10
-- ------------------------------------------------------
-- Server version       5.1.52

/*!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 */;
/*!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 2012-02-13  9:30:47
share|improve this question

migrated from stackoverflow.com Feb 13 '12 at 14:09

This question came from our site for professional and enthusiast programmers.

    
Is that all that is in your dump file? –  Pekka 웃 Feb 13 '12 at 9:38

2 Answers 2

I might be missing something, but instead of using mysqldump, use mysql which is the command line client program:

mysql -uuser -ppassword -hhost blink10 < /data/tt.sql

This assumes there are actual SQL staetments in your tt.sql file, such as CREATE TABLE and INSERT, etc

share|improve this answer
    
Quick and dirty answers are usually the best ones. +1 !!! –  RolandoMySQLDBA Feb 13 '12 at 15:39

Your SQL file does not contain any record to import, just some directive...
Probably your backup was taken in a wrong way...

share|improve this answer
    
i used the same mysql dump phrase with the < symbol reversed...it generated a mysql file which is several GBs in size..what did i miss that needs to be in the statement to export initally? –  user1179295 Feb 13 '12 at 9:42
    
@user1179295: so, As Pekka asked you, file you posted is partial, right? You should have many lines between starting and finally directives, right? –  Marco Feb 13 '12 at 9:44
    
@user1179295: you could use --result-file=filename to dump, but I think it's the same... –  Marco Feb 13 '12 at 9:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.