Page 1 of 1

Need help in exporting and importing database in mysql forma

Posted: Tue Dec 16, 2008 12:54 am
by rajsekar2u
Hi all,

i need help in php mysql
am creating a web page for that i need to import and export database in sql format
please help me in this
its urgent
thanks in advance
rajasekar

Re: Need help in exporting and importing database in mysql forma

Posted: Tue Dec 16, 2008 2:17 am
by jaoudestudios
If you have phpmyadmin installed, copy the code from there :D

Re: Need help in exporting and importing database in mysql forma

Posted: Tue Dec 16, 2008 4:57 am
by rajsekar2u
I've phpmyadmin...
but i didnt got any php script for export or import in that.....

Re: Need help in exporting and importing database in mysql forma

Posted: Tue Dec 16, 2008 1:40 pm
by jaoudestudios
Its not going to give you the scripts, you will have to dive into the source code!

Re: Need help in exporting and importing database in mysql forma

Posted: Wed Dec 17, 2008 3:45 am
by rajsekar2u
Thx.......

Re: Need help in exporting and importing database in mysql forma

Posted: Wed Dec 17, 2008 7:04 am
by Eran
If you have the mysql command line installed, you could use shell_exec to dump through it:

Code: Select all

shell_exec("mysqldump -u[username] -p[password] -d --skip-add-drop-table [database] > path/to/database.sql");
Replace username/password/database/path to fit your configuration.