RE: Transfering database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Considering myself, I am not a mind reader...
 

-----Original Message-----
From: Gryffyn, Trevor
To: php mailinglist
Cc: Sudeep Zamudra
Sent: 27-5-2004 15:41
Subject: RE:  Transfering database

Firstly.. Isn't this a list where people can ask for help, even when
they're just getting started in PHP?   I'm guessing that english isn't
Sudeep's first language, but the request was clear enough for us to
understand and answer.  Don't assume that someone hasn't done research
just because the question is simple.

As for unix systems and such, he said that he didn't know unix shell
commands, but the 'root' login mentioned seems to be the one for the
MySQL database, not the *nix system.


What I'd recommend.. If a PHP script is requested for the task, possibly
in order to avoid using *nix commands that someone might not be as
familiar with as PHP, is to write a PHP script to do something like
this:

1. Make connection to source database and read data from tables (even
table structure if you want) into arrays

2. Make connection to destinatination database and perform the necessary
inserts and possibly create the tables needed


It'll take a little work and maybe Sudeep is just wondering if someone
had already created a script to do this.  Maybe that's what the question
really is, not "How do I import a bunch of dumped tables from text files
into SQL using unix commands I'm not familiar with".  Try reading
between the lines a little guys, and being a little more charitable.
None of us were born with PHP knowledge, we all had to learn somewhere.

-TG

> -----Original Message-----
> From: Angelo Zanetti [mailto:binc2@xxxxxxxxxxx] 
> Sent: Thursday, May 27, 2004 5:19 AM
> To: Sudeep Zamudra; Svensson, B.A.T. (HKG)
> Cc: php mailinglist
> Subject: RE:  Transfering database
> 
> 
> why dont you do some research before you just expect other 
> people to your
> work for you. YOu seem to make no attempt to find out 
> anything about what
> you've asked. Svensson gave you the the commands for what you 
> just asked.
> 
> it's getting ridiculous, anyone second that?
> 
> Angelo
> 
> -----Original Message-----
> From: Sudeep Zamudra [mailto:sudeep_zamudra@xxxxxxxxx]
> Sent: Thursday, May 27, 2004 10:04 AM
> To: Svensson, B.A.T. (HKG)
> Cc: php mailinglist
> Subject: RE:  Transfering database
> 
> 
> hi,
> 
> Please make it clear. My server is unix. I have no knowledge of shell
> commands. This is what i want. Ex:- My username is root and 
> database name is
> xyz and the .sql file is in my server www/html/test/. What should i do
> 
> "Svensson, B.A.T. (HKG)" <B.A.T.Svensson@xxxxxxx> wrote:
> RTFM:
> 
> popen("mysql -u username -p database < 
> C:\path\to\your\dump\file.sql");
> 
> shell_exec("mysql -u username -p database < 
> C:\path\to\your\dump\file.sql");
> 
> system("mysql -u username -p database < 
> C:\path\to\your\dump\file.sql");
> 
> 
> etc, etc, etc...
> 
> -----Original Message-----
> From: Sudeep Zamudra
> To: Jeroen Serpieters
> Cc: php-windows@xxxxxxxxxxxxx
> Sent: 27-5-2004 9:13
> Subject: Re:  Transfering database
> 
> Thanx for your suggestions. But i am looking for a php script 
> by which i
> can do this not from the mysql shell command line. If any has it .
> Please suggest it to me.
> 
> Thanx
> 
> Jeroen Serpieters wrote:
> On Wed, 26 May 2004, Sudeep Zamudra wrote:
> 
> >
> > I have dumped my entire database into files with extension '.sql'
> (separate file for each table). Now please tell me any function or
> statements if any to tranfer the contents of the file(i.e table
> structure and table contents) into a new database which is on another
> database server. I guess there is a statement for this. Help please.
> >
> 
> 
> --
> Jeroen
> 
> There are only two kinds of programming languages: those people always
> bitch about and those nobody uses.
> -- Bjarne Stroustrup

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

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux