473,322 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

PHP MySQL database export

64
Hi,

I need a script that I can put in my admin panel to back up/restore, export/import a MySQL database.
Something to use online, instead of PHPMyAdmin

Somebody please help.
Nov 12 '08 #1
4 1826
nathj
938 Expert 512MB
Try a Google search

Alternatively you can use a desktop application such as Navicat (commercial product) or what about MySQL WorkBench

That's my suggestion, personally I use Navicat or PHPMyAdmin if the host provides it.

nathj
Nov 12 '08 #2
Atli
5,058 Expert 4TB
You could try doing mysqldump using one of the program execution functions and then output the dump file. You could even try zipping it first if you want that.

Then, if the user wants to restore the database, you simply have them upload the backup file and execute it using one of the program execution functions.
Something like this should work:
Expand|Select|Wrap|Line Numbers
  1. exec("mysql -u Username -pPassword < /path/to/backup/file.sql");
Nov 12 '08 #3
gnawz
64
I need to do something like have a button or link that a user clicks then it opens a browse window for the user to select where to save the backup copy of the database...
Nov 12 '08 #4
dlite922
1,584 Expert 1GB
I need to do something like have a button or link that a user clicks then it opens a browse window for the user to select where to save the backup copy of the database...
Do what Atli is suggesting, but program it to a button or a link.

You need to know at least the basics of PHP programming.




Dan
Nov 13 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Mike MacSween | last post by:
My client has an MS Access database application on her local machine. I have full access to that in terms of changing the design. I've got a simple PHP/MySql application on shared hosting, so no...
0
by: David Alonzo | last post by:
I'm trying to do an export from an SQL Server 2000 Database to and ODBC driver pointed to a mySQL Server Database. The export works if there is at least one record in the mySQL table. If the mySQL...
1
by: Dave Crypto | last post by:
Hi there, SUMMARY: 1) When I use phpadmin to export a large database, the file created on my local PC never containes all the tables and information. It seems to max out at about 10mb. 2)...
4
by: news | last post by:
Our production database in an exported textfil runs about 60 MB. Compressed that's about 9 MB. I'm trying to import the export into another machine running FC3 and mySQL 11.18, and it appears as...
3
by: Xerxes | last post by:
Hi, I would like to import the tables from MySQL database into Access database and I am not sure how to go about it. I tired to "Import External Data" from Access, selected "ODBC database" from...
7
by: phillip.s.powell | last post by:
We're looking at a GUI interface for our MySQL DB and I am interested in MySQL Administrator, however, one of our requirements is to be able to import/export databases. Is this possible or do I...
6
by: frank78 | last post by:
Hi everyone, I am having a little bit of trouble backing up some mySQL tables. I've been trying to adapt a script I found on the internet at...
7
by: Randy | last post by:
Folks: We have a web-based app that's _really_ slowing down because multiple clients are writing their own private data into a single, central database. I guess the previous programmer did...
15
by: Franz Marksteiner | last post by:
Hi folks, I am looking for the straightest way to export a whole MySql database, but all I can find is SQL statements to export specific tables. Any suggestions? -- Freundliche Grüße, Franz...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.