[PHP] MySQL back up

2002-10-07 Thread Ken

Hi All!

Anyone know how to code the MySQL command in PHP to make the database script
download to your local hard disk, without writing 100 lines of code?

I tried the mysqldump without any luck, but I think there is an easy way to
do it, just not sure how to code it.

Thanks in advance!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] mySQL back up

2002-03-04 Thread Wilbert Enserink

Hi all,

I have a mySQL back up q: I have a textfile which is filled with statements
as:

--

DROP TABLE Clients\g

CREATE TABLE Clients(
 ID INT,
 date BLOB,
 name BLOB,
 age BLOB,
 PRIMARY KEY (ID)
)\g

INSERT INTO Clients VALUES ('all record data')\g
INSERT INTO Clients VALUES ('next record data')\g
..and so on


---

My Q: How an I restore the tables as mentioned in my text file? Is it
possible to 'run' this file so to speak?

thx in advance!!

Wilbert


- 
Pas de Deux 
Van Mierisstraat 25 
2526 NM Den Haag 
tel 070 4450855 
fax 070 4450852 
http://www.pdd.nl 
[EMAIL PROTECTED] 
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mySQL back up

2002-03-04 Thread Scott St. John

1)Create the db in mysql:  mysqladmin -u (your user name) -p (if you have 
a password) create (new database name)

2)mysql -D (the name you used above)  (the text file)

Works on Unix and 2000.  Is that what you mean?

-Scott




On Mon, 4 Mar 2002, Wilbert Enserink wrote:

 Hi all,
 
 I have a mySQL back up q: I have a textfile which is filled with statements
 as:
 
 --
 
 DROP TABLE Clients\g
 
 CREATE TABLE Clients(
  ID INT,
  date BLOB,
  name BLOB,
  age BLOB,
  PRIMARY KEY (ID)
 )\g
 
 INSERT INTO Clients VALUES ('all record data')\g
 INSERT INTO Clients VALUES ('next record data')\g
 ..and so on
 
 
 ---
 
 My Q: How an I restore the tables as mentioned in my text file? Is it
 possible to 'run' this file so to speak?
 
 thx in advance!!
 
 Wilbert
 
 
 - 
 Pas de Deux 
 Van Mierisstraat 25 
 2526 NM Den Haag 
 tel 070 4450855 
 fax 070 4450852 
 http://www.pdd.nl 
 [EMAIL PROTECTED] 
 -
 
 

-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mySQL back up

2002-03-04 Thread Anas Mughal

Well,
Run mysql with that file as input.
I work on Linux and I do something like:

mysql -ppassword DBNAME  dump.sql

Where 
DBNAME is the name of the database,
dump.sql is the text file,
password is my password.

(I think I did something on Windows months and it
worked.)



--- Wilbert Enserink [EMAIL PROTECTED] wrote:
 Hi all,
 
 I have a mySQL back up q: I have a textfile which is
 filled with statements
 as:
 
 --
 
 DROP TABLE Clients\g
 
 CREATE TABLE Clients(
  ID INT,
  date BLOB,
  name BLOB,
  age BLOB,
  PRIMARY KEY (ID)
 )\g
 
 INSERT INTO Clients VALUES ('all record data')\g
 INSERT INTO Clients VALUES ('next record data')\g
 ..and so on
 
 
 ---
 
 My Q: How an I restore the tables as mentioned in my
 text file? Is it
 possible to 'run' this file so to speak?
 
 thx in advance!!
 
 Wilbert
 
 
 - 
 Pas de Deux 
 Van Mierisstraat 25 
 2526 NM Den Haag 
 tel 070 4450855 
 fax 070 4450852 
 http://www.pdd.nl 
 [EMAIL PROTECTED] 
 -
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


=
Anas Mughal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel: 973-249-6665

__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php