473,657 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP MySQL database export

64 New Member
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 1844
nathj
938 Recognized Expert Contributor
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 Recognized Expert Expert
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 New Member
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 Recognized Expert Top Contributor
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
4188
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 direct access to the db server. I'd like to give her the facility to export the information in her local Access application to the shared PHP/MySql site. From one command button (or similar) in the Access application.
0
1152
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 table is empty it gives an error that looks like this: Insert error, column 1 ('field1', DBTYPE_STR), status 6: Data overflow. The strange part is that the export works perfectly fine as long as there is one record in the mySQL table, if there...
1
4031
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) Will running mysqldump from command line on a live in-use DB (with one table containing 350,000 rows) pose any risks and have any large effect of current use?
4
12701
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 though the file may be too big! When I try to do it via command line: mysql -u root --host=localhost printing < ./printing.txt It eventually errors out with a "syntax error on line X" and only about
3
4911
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 file type dropdown, selected "New data source" and picked SQL Server from the list. I specified the server name (mydomain.com) along with user id and password. But when I clicked on "Next", I got: "connection failed: SQL Server Error:10060,...
7
33400
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 need to know else (e.g. Navicat)? Thanks Phil
6
1737
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 http://blogs.linux.ie/xeer/2005/06/28/simple-mysql-backup/ . However, i have been having trouble (under bash) on getting it to work. I know my mysql account has full privileges to all account information. Using the script below, it even prints out all the table names, however, when I run this...
7
4186
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 things this way because it made things easy. Well, I'm the person that has to put up with the long-term headache. Anywho, someone at work wants things sped up, so what I'm looking at doing is this for each client:
15
3294
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 Marksteiner
39
5849
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 ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.