On 2005-11-06, Todd Cary [EMAIL PROTECTED] wrote:
system(mysql -u user -p db /tmp/mydb);
With the -p switch, the user is asked for the password. How does that
happen with the system command?
Don't leave a space between -p and the password
mysql -u user -pyourpassword -h somehost db
Robert -
I installed phpmyadmin on the shared server, however I am not sure of
the command to run the sql file, mybackup.sql, that was created on the
dedicated server with mysqldump.
The docs as best as I can read them indicate that all I need to type
into the Run SQL query text box is the
Robert -
I used the backup file on my desktop computer and the browse button.
After the upload was over, I got this message:
Your SQL query has been executed successfully:
The content of your file has been inserted. (sfyc_data_20051105.sql:
1 Instructions)
However the tables were not
, you
can separate out the sql commands from the file into separate files.
-Original Message-
From: Todd Cary [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 06, 2005 8:43 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Using PHP to import a DB
Robert -
I installed phpmyadmin
-
From: Todd Cary [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 06, 2005 8:57 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Using PHP to import a DB
Robert -
I used the backup file on my desktop computer and the browse button.
After the upload was over, I got this message:
Your SQL query
in my previous email.
-Original Message-
From: Todd Cary [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 06, 2005 8:57 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Using PHP to import a DB
Robert -
I used the backup file on my desktop computer and the browse button.
After the upload
system(mysql -u user -p db /tmp/mydb);
On Saturday 05 November 2005 4:02 pm, Todd Cary wrote:
My client switched from a dedicated server to a shared server, so I
cannot use the command line to import a DB that was produced with
mysqldump. Can I duplicate mysql -u user -p db /tmp/mydb
You could run a system command from the web browser to import the text file.
If you have access to PHPmyAdmin, you could use it to then import the file.
Or finally, you should be able to read the contents of the file into a
variable (if it's small enough) and then run the query using mysql_query.
Micah -
With the -p switch, the user is asked for the password. How does that
happen with the system command?
Todd
Micah Stevens wrote:
system(mysql -u user -p db /tmp/mydb);
On Saturday 05 November 2005 4:02 pm, Todd Cary wrote:
My client switched from a dedicated server to a
Don't use it, use --password= instead..
The downside to this is that anyone can see your password in the process list,
but I'm going to hazard a guess that no users are scanning the process list
that often on a shared webserver.
-Micah
On Saturday 05 November 2005 5:21 pm, Todd Cary
10 matches
Mail list logo