mysqldump doesn't create tables or import any data The 2019 Stack Overflow Developer Survey...
What is the meaning of Triage in Cybersec world?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
What is the meaning of the verb "bear" in this context?
Is an up-to-date browser secure on an out-of-date OS?
How can I autofill dates in Excel excluding Sunday?
Why was M87 targetted for the Event Horizon Telescope instead of Sagittarius A*?
Which Sci-Fi work first showed weapon of galactic-scale mass destruction?
How to answer pointed "are you quitting" questioning when I don't want them to suspect
What do the Banks children have against barley water?
Why isn't the circumferential light around the M87 black hole's event horizon symmetric?
Loose spokes after only a few rides
Right tool to dig six foot holes?
For what reasons would an animal species NOT cross a *horizontal* land bridge?
Is "plugging out" electronic devices an American expression?
How to manage monthly salary
Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?
Can one be advised by a professor who is very far away?
How to support a colleague who finds meetings extremely tiring?
Output the Arecibo Message
Can you compress metal and what would be the consequences?
What is the closest word meaning "respect for time / mindful"
Identify boardgame from Big movie
Why didn't the Event Horizon Telescope team mention Sagittarius A*?
If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?
mysqldump doesn't create tables or import any data
The 2019 Stack Overflow Developer Survey Results Are InMysql charset problemCan I get SQL Server Import Wizard to create PK's, FK's and Indexes?What is the fastest way to convert MySQL columns to UTF8 from latin1 colums who's data is actually UTF8?MySQL cancelled import - orphaned data in ibdata filemysqldump doesn't export all records from tableCherry pick and import tables from remote mysql database into local?Command line import of database using latin1 encodingHow to test mysql database and records have migrated server correctly?Issues importing large mysql databaseMySQL import slowing, jbd2 high disk I/O
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I am trying to import a mysqldump into a new database. When I run:
mysqldump -umydbuser -p --database testimport < database.dump
I get the following output:
Enter password:
-- MySQL dump 10.11
--
-- Host: localhost Database: testimport
-- ------------------------------------------------------
-- Server version 5.0.75-0ubuntu10.3
/*!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 */;
--
-- Current Database: `testimport`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `testimport` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `testimport`;
/*!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 2010-03-09 17:46:03
However, when I look at the testimport database, there are no tables and no data. Even if I export a working database by:
mysqldump -umydbuser -p --database workingdatabase > test.sql
and then import:
mysqldump -umydbuser -p --database testimport < test.sql
I get the same output, but nothing is imported into the testimport
database. I don't see any errors in the output and it is using the proper database. If I tail the exported .sql file, I see the create statements for all tables and the inserts for all data. Why isn't this data importing? Is there any additional logging I can see?
mysql import
add a comment |
I am trying to import a mysqldump into a new database. When I run:
mysqldump -umydbuser -p --database testimport < database.dump
I get the following output:
Enter password:
-- MySQL dump 10.11
--
-- Host: localhost Database: testimport
-- ------------------------------------------------------
-- Server version 5.0.75-0ubuntu10.3
/*!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 */;
--
-- Current Database: `testimport`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `testimport` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `testimport`;
/*!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 2010-03-09 17:46:03
However, when I look at the testimport database, there are no tables and no data. Even if I export a working database by:
mysqldump -umydbuser -p --database workingdatabase > test.sql
and then import:
mysqldump -umydbuser -p --database testimport < test.sql
I get the same output, but nothing is imported into the testimport
database. I don't see any errors in the output and it is using the proper database. If I tail the exported .sql file, I see the create statements for all tables and the inserts for all data. Why isn't this data importing? Is there any additional logging I can see?
mysql import
add a comment |
I am trying to import a mysqldump into a new database. When I run:
mysqldump -umydbuser -p --database testimport < database.dump
I get the following output:
Enter password:
-- MySQL dump 10.11
--
-- Host: localhost Database: testimport
-- ------------------------------------------------------
-- Server version 5.0.75-0ubuntu10.3
/*!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 */;
--
-- Current Database: `testimport`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `testimport` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `testimport`;
/*!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 2010-03-09 17:46:03
However, when I look at the testimport database, there are no tables and no data. Even if I export a working database by:
mysqldump -umydbuser -p --database workingdatabase > test.sql
and then import:
mysqldump -umydbuser -p --database testimport < test.sql
I get the same output, but nothing is imported into the testimport
database. I don't see any errors in the output and it is using the proper database. If I tail the exported .sql file, I see the create statements for all tables and the inserts for all data. Why isn't this data importing? Is there any additional logging I can see?
mysql import
I am trying to import a mysqldump into a new database. When I run:
mysqldump -umydbuser -p --database testimport < database.dump
I get the following output:
Enter password:
-- MySQL dump 10.11
--
-- Host: localhost Database: testimport
-- ------------------------------------------------------
-- Server version 5.0.75-0ubuntu10.3
/*!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 */;
--
-- Current Database: `testimport`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `testimport` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `testimport`;
/*!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 2010-03-09 17:46:03
However, when I look at the testimport database, there are no tables and no data. Even if I export a working database by:
mysqldump -umydbuser -p --database workingdatabase > test.sql
and then import:
mysqldump -umydbuser -p --database testimport < test.sql
I get the same output, but nothing is imported into the testimport
database. I don't see any errors in the output and it is using the proper database. If I tail the exported .sql file, I see the create statements for all tables and the inserts for all data. Why isn't this data importing? Is there any additional logging I can see?
mysql import
mysql import
edited Mar 9 '10 at 17:57
George
asked Mar 9 '10 at 17:51
GeorgeGeorge
163117
163117
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
You want to run the dump through the mysql client.
Example:
mysql -uroot -p testimport < database.dump
2
Different tools for different purposes, Josh.
– Warner
Oct 20 '15 at 3:13
add a comment |
Because when you dump data (Backup) you used "mysqldump" :
mysqldump -u user -p Database_name > SQL_dump_file.sql
But when restore data into database you need to use only "mysql":
mysql -u user -p Database_name < SQL_dump_file.sql
add a comment |
I had the same problem, just export de DDL (only structure) and export full database, then import first the DDL file, next import the full file using the same sentence
mysqldump -uroot -p 'database' < 'filename.sql'
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f120843%2fmysqldump-doesnt-create-tables-or-import-any-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You want to run the dump through the mysql client.
Example:
mysql -uroot -p testimport < database.dump
2
Different tools for different purposes, Josh.
– Warner
Oct 20 '15 at 3:13
add a comment |
You want to run the dump through the mysql client.
Example:
mysql -uroot -p testimport < database.dump
2
Different tools for different purposes, Josh.
– Warner
Oct 20 '15 at 3:13
add a comment |
You want to run the dump through the mysql client.
Example:
mysql -uroot -p testimport < database.dump
You want to run the dump through the mysql client.
Example:
mysql -uroot -p testimport < database.dump
answered Mar 9 '10 at 17:55
WarnerWarner
21.3k14665
21.3k14665
2
Different tools for different purposes, Josh.
– Warner
Oct 20 '15 at 3:13
add a comment |
2
Different tools for different purposes, Josh.
– Warner
Oct 20 '15 at 3:13
2
2
Different tools for different purposes, Josh.
– Warner
Oct 20 '15 at 3:13
Different tools for different purposes, Josh.
– Warner
Oct 20 '15 at 3:13
add a comment |
Because when you dump data (Backup) you used "mysqldump" :
mysqldump -u user -p Database_name > SQL_dump_file.sql
But when restore data into database you need to use only "mysql":
mysql -u user -p Database_name < SQL_dump_file.sql
add a comment |
Because when you dump data (Backup) you used "mysqldump" :
mysqldump -u user -p Database_name > SQL_dump_file.sql
But when restore data into database you need to use only "mysql":
mysql -u user -p Database_name < SQL_dump_file.sql
add a comment |
Because when you dump data (Backup) you used "mysqldump" :
mysqldump -u user -p Database_name > SQL_dump_file.sql
But when restore data into database you need to use only "mysql":
mysql -u user -p Database_name < SQL_dump_file.sql
Because when you dump data (Backup) you used "mysqldump" :
mysqldump -u user -p Database_name > SQL_dump_file.sql
But when restore data into database you need to use only "mysql":
mysql -u user -p Database_name < SQL_dump_file.sql
answered Sep 19 '15 at 18:28
TommyDoTommyDo
17112
17112
add a comment |
add a comment |
I had the same problem, just export de DDL (only structure) and export full database, then import first the DDL file, next import the full file using the same sentence
mysqldump -uroot -p 'database' < 'filename.sql'
New contributor
add a comment |
I had the same problem, just export de DDL (only structure) and export full database, then import first the DDL file, next import the full file using the same sentence
mysqldump -uroot -p 'database' < 'filename.sql'
New contributor
add a comment |
I had the same problem, just export de DDL (only structure) and export full database, then import first the DDL file, next import the full file using the same sentence
mysqldump -uroot -p 'database' < 'filename.sql'
New contributor
I had the same problem, just export de DDL (only structure) and export full database, then import first the DDL file, next import the full file using the same sentence
mysqldump -uroot -p 'database' < 'filename.sql'
New contributor
New contributor
answered 9 mins ago
kjim221kjim221
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f120843%2fmysqldump-doesnt-create-tables-or-import-any-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown