Re: It's Friday (a MySQL Question)
| From: | Daniel P. Brown | Date: | Fri, 13 Aug 2010 22:11:29 +0000 |
| Subject: | Re: It's Friday (a MySQL Question) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307445@lists.php.net to get a copy of this message | ||
On Fri, Aug 13, 2010 at 17:48, tedd <tedd@sperling.com> wrote:
>
> SELECT * FROM table_reference INTO OUTFILE 'file_name'
>
> It looked to be bit simpler/shorter than my code, so I tried it. But it
> reports:
>
> Access denied for user 'me'@'localhost' (using password: YES).
>
> I suspect that the "access being denied" is because MySQL doesn't have
> permission to create the output file. The MySQL manual reports: 1) that a
> file cannot be present; 2) AND MySQL must have file privileges to create the
> file -- but I don't know how to set that up.
No, the 'access denied' message means that either the username or
password is incorrect, or that the given user doesn't have permission
to access the given database on the given host.
Easiest method, from the command line on the server from which you
want to dump the database:
mysqldump -u user -p database_name > outfile.sql
(Where
user is the username, database_name is the database to
dump, and outfile.sql is the name of the file to which you will
write. You will be prompted for the password.)
--
</Daniel P. Brown>
UNADVERTISED DEDICATED SERVER SPECIALS
SAME-DAY SETUP
Just ask me what we're offering today!
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/