[BlueOnyx:17507] Re: mysqldump.sql
Richard Sidlin
richard at sidlin.co.uk
Fri May 1 15:10:15 -05 2015
Mmm. I ran this as root:
mysql -u root -pxxxx site37_db < /home/restore/mk-linux-03.xxxx.co.uk.mysqldump.sql
and it has restored ALL databases on the server! Should I have run this as the user instead of root?
Or this from the shell:
mysqldump -uUSERNAME -h localhost -pPASSWORD DBNAME > /PATH/FILENAME
On May 1, 2015, at 11:44 AM, Richard Sidlin <richard at sidlin.co.uk <mailto:richard at sidlin.co.uk> > wrote:
Hi Rich,
How do I extract one MySQL database out of the mysqldum.sql file as I
need to restore one that has been hacked? The size of the dump file is
134MB but the import limit in phpMyAdmin is 8MB.
You can edit the .sql file with your favorite text-editor. Search for the
db
name, and you will see a statement with the dump of that database starts.
Delete every other dump of other databases in that text file (be sure to
save
a copy before doing so), and you will have a dump file of that one
particular
db, which by itself can be imported.
--
Maurice
_______________________________________________
Thanks Maurice.
_______________________________________________
Blueonyx mailing list
Blueonyx at mail.blueonyx.it <mailto:Blueonyx at mail.blueonyx.it>
http://mail.blueonyx.it/mailman/listinfo/blueonyx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20150501/e0d1d262/attachment.html>
More information about the Blueonyx
mailing list