php-windows Digest 11 Feb 2003 10:02:26 -0000 Issue 1582
Topics (messages 18440 through 18446):
MySQL: some script I must do
18440 by: Rui
18442 by: Cam Dunstan
18443 by: Rui
18444 by: Cam Dunstan
18446 by: Svensson, B.A.T. (HKG)
MySQL Dump
18441 by: Nick H. -- Technical Support Engineer
Re: how to make php4ts.dll act as a module of vb6 program?
18445 by: cmkpl
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
First of all, I must thank all the people who tried to help me in the
earlier prob.
Now I know how to make dump's.
The problem now is that I don't know how should I send the database.
I tried to make a dump > data.TXT and also tried data.sql. Both were in
vain.
I must run some kind of script but I don't know what.
Tried:
\.data.sql
I had to put the also the source, but when I pressed Enter key, an error
apears "ERROR 1046: No database selected"
What's wrong?
Thanks.
Old
message --------------------------------------------------------------------
-------------------
Hy there,
I want to put a mysql database on a external server. My ISP told me that I
need to make a Dump of the data and then make some kind of script that I
couldn't understand.
Could anyone explain what I need to do?
Thanks a lot,
Cya
--- End Message ---
--- Begin Message ---
Not sure if I fully understand your problem Rui but I would think your ISP
means an SQL statement type dump - that is, the data you have is put in the
form of a giant SQL statement - a collection of INSERT statements, one for
each record you want to insert. Perhaps this might need to be preceeded by
a CREATE TABLE statement.
INSERT into customers (name, address) VALUES ("fred nurk", "downtown");
INSERT into customers (name, address) VALUES ("joe blow", "uptown");
etc etc
Then present this statement(s) to your ISPs database server with a PHP
script.
Am I making sense to your problem? In what form is the data you already
have in??
----- Original Message -----
From: "Rui" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 7:32 AM
Subject: [PHP-WIN] MySQL: some script I must do
> First of all, I must thank all the people who tried to help me in the
> earlier prob.
> Now I know how to make dump's.
>
> The problem now is that I don't know how should I send the database.
> I tried to make a dump > data.TXT and also tried data.sql. Both were in
> vain.
>
> I must run some kind of script but I don't know what.
> Tried:
> \.data.sql
> I had to put the also the source, but when I pressed Enter key, an error
> apears "ERROR 1046: No database selected"
>
> What's wrong?
>
> Thanks.
>
>
> Old
>
message --------------------------------------------------------------------
> -------------------
>
> Hy there,
>
> I want to put a mysql database on a external server. My ISP told me that I
> need to make a Dump of the data and then make some kind of script that I
> couldn't understand.
>
> Could anyone explain what I need to do?
>
> Thanks a lot,
>
> Cya
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I already have the database made.
I want to put the database on the server.
They told me that I must do a Dump and then run some kind of script that I
dont quite get it.
The problem is that I don't know how to run/make the script.
Thanks
"Cam Dunstan" <[EMAIL PROTECTED]> escreveu na mensagem
005501c2d158$a29387e0$7866a8c0@camhome">news:005501c2d158$a29387e0$7866a8c0@camhome...
> Not sure if I fully understand your problem Rui but I would think your ISP
> means an SQL statement type dump - that is, the data you have is put in
the
> form of a giant SQL statement - a collection of INSERT statements, one for
> each record you want to insert. Perhaps this might need to be preceeded
by
> a CREATE TABLE statement.
>
> INSERT into customers (name, address) VALUES ("fred nurk", "downtown");
> INSERT into customers (name, address) VALUES ("joe blow", "uptown");
>
> etc etc
>
> Then present this statement(s) to your ISPs database server with a PHP
> script.
>
> Am I making sense to your problem? In what form is the data you already
> have in??
>
>
>
>
>
>
>
>
>
>
> ----- Original Message -----
> From: "Rui" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, February 11, 2003 7:32 AM
> Subject: [PHP-WIN] MySQL: some script I must do
>
>
> > First of all, I must thank all the people who tried to help me in the
> > earlier prob.
> > Now I know how to make dump's.
> >
> > The problem now is that I don't know how should I send the database.
> > I tried to make a dump > data.TXT and also tried data.sql. Both were in
> > vain.
> >
> > I must run some kind of script but I don't know what.
> > Tried:
> > \.data.sql
> > I had to put the also the source, but when I pressed Enter key, an error
> > apears "ERROR 1046: No database selected"
> >
> > What's wrong?
> >
> > Thanks.
> >
> >
> > Old
> >
>
message --------------------------------------------------------------------
> > -------------------
> >
> > Hy there,
> >
> > I want to put a mysql database on a external server. My ISP told me that
I
> > need to make a Dump of the data and then make some kind of script that I
> > couldn't understand.
> >
> > Could anyone explain what I need to do?
> >
> > Thanks a lot,
> >
> > Cya
> >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--- End Message ---
--- Begin Message ---
1. You have a mysql database sitting on your windows server
2. your ISP has mySQL sitting on his (unix? windows?) server
3. you can get to his sql server using perhaps phpMyAdmin or a simple PHP
script such as
$db = mysql_connect("servername", "username", "password");
- are all the above true or false?
----- Original Message -----
From: "Rui" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 10:08 AM
Subject: Re: [PHP-WIN] MySQL: some script I must do
> I already have the database made.
> I want to put the database on the server.
> They told me that I must do a Dump and then run some kind of script that I
> dont quite get it.
> The problem is that I don't know how to run/make the script.
>
> Thanks
>
> "Cam Dunstan" <[EMAIL PROTECTED]> escreveu na mensagem
> 005501c2d158$a29387e0$7866a8c0@camhome">news:005501c2d158$a29387e0$7866a8c0@camhome...
> > Not sure if I fully understand your problem Rui but I would think your
ISP
> > means an SQL statement type dump - that is, the data you have is put in
> the
> > form of a giant SQL statement - a collection of INSERT statements, one
for
> > each record you want to insert. Perhaps this might need to be preceeded
> by
> > a CREATE TABLE statement.
> >
> > INSERT into customers (name, address) VALUES ("fred nurk", "downtown");
> > INSERT into customers (name, address) VALUES ("joe blow", "uptown");
> >
> > etc etc
> >
> > Then present this statement(s) to your ISPs database server with a PHP
> > script.
> >
> > Am I making sense to your problem? In what form is the data you already
> > have in??
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Rui" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 11, 2003 7:32 AM
> > Subject: [PHP-WIN] MySQL: some script I must do
> >
> >
> > > First of all, I must thank all the people who tried to help me in the
> > > earlier prob.
> > > Now I know how to make dump's.
> > >
> > > The problem now is that I don't know how should I send the database.
> > > I tried to make a dump > data.TXT and also tried data.sql. Both were
in
> > > vain.
> > >
> > > I must run some kind of script but I don't know what.
> > > Tried:
> > > \.data.sql
> > > I had to put the also the source, but when I pressed Enter key, an
error
> > > apears "ERROR 1046: No database selected"
> > >
> > > What's wrong?
> > >
> > > Thanks.
> > >
> > >
> > > Old
> > >
> >
>
message --------------------------------------------------------------------
> > > -------------------
> > >
> > > Hy there,
> > >
> > > I want to put a mysql database on a external server. My ISP told me
that
> I
> > > need to make a Dump of the data and then make some kind of script that
I
> > > couldn't understand.
> > >
> > > Could anyone explain what I need to do?
> > >
> > > Thanks a lot,
> > >
> > > Cya
> > >
> > >
> > >
> > >
> > > --
> > > 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
>
>
--- End Message ---
--- Begin Message ---
> I must run some kind of script but I don't know what.
> Tried:
> \.data.sql
> I had to put the also the source, but when I pressed Enter key, an error
> apears "ERROR 1046: No database selected"
>
> What's wrong?
You haven't RTFM.
--- End Message ---
--- Begin Message ---
You need to select the Database either in your script or via command line.
If you're doing it via the command line, it would be this:
use dbname
where dbname is the name of your database. If you're using a script, drop
this in:
$db = mysql_connect("$host", "$user","$pass");
mysql_select_db("$dbname",$db);
Where $host is the host name, $user is the username, $pass is the password
and $dbname is the database name. Do not modify the $db unless you're
changing them both to another variable like $db_connect.
You would then proceed after this to do your database dump.
Regards,
Nick H.
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
because i just know oho,vb and pascal
and i only know how to use VB to write server
^^
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/1/2003
--- End Message ---