PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, January 25, 2022

[FIXED] How to add a specific database from mysqldump

 January 25, 2022     database, mysql, phpmyadmin     No comments   

Issue

I need to copy specific record from 1 database. The problem is that i can't find the way to insert only one database from mysqldump file.

  1. File is too big to even try open it in txt editor.

  2. File is too big to upload it in phpmyadmin

    I aslo could't find how to do it in mysql console (only how to add 1 database from database.sql file, but in current case i am using mysqldump, so that won't work).

I am using wamp on localhost.

Any ideas?


Solution

You can use,

mysql -u username -p -D reqd_database --one-database < database.sql

This will source only the SQL queries that apply to the chosen database.



Answered By - franklinsijo
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing