MySQL Export!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

MySQL Export!

Post by Joe »

How could I export my MySQL database to a .sql file. I tried SELECT * INTO however, I was resulted in an error saying that I did not have the appropiate permissions.

Is there another way around this?.

Regards


Joe
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Use the mysqldump program.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

I am assuming this is possible with PHP?. You see I am creating my very own database manager (from boredom) and this is the only part I am having troubles with. I did try the mysqldump but I got errors.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Oh right...well of course it will be possible to run it with exec() but would be a bit of a hassle. Have you looked to see how phpmyAdmin does it?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Yeah, phpMyAdmin was one of the first things I reffered to when I first bumped into the problem but I cannot seem to find the part which creates the dump. I searched through:

export.php
db_details_export.php
libraries/display_export.lib.php

with no luck. It was from then I tried SELECT * INTO and was resulted in errors.
Post Reply