MySQL Dumps

software development

#1

Hi

I can’t seem to export my MySQL database, as I don’t have permissions to create a temporary file on the database server (as needed to perform the operation). Here’s the MySQL error message:

[code]MySQL Said: Access denied for user: ‘fba@egon.dreamhost.com’ (Using password: YES).

Query: SELECT * INTO OUTFILE ‘/var/tmp/GTMM101222186822552791’ FIELDS
TERMINATED BY ‘|’ ESCAPED BY ‘\’ LINES TERMINATED BY '\n’
FROM ata_members
[/code]What can I do to get around this?

  • wil

#2

Hey wil,

Just use the mysqldump command from the command line on your web server, rather than doing it from mysql directly.

Try just typing mysqldump to see the usage!

Josh

josh!


#3

Hi Josh

Thanks for your help. Unfortunately, this isn’t quite what I need. I actually need to export my database into another application but I can’t do this as I don’t have access to create temporary dump files on the server.

Thanks

  • wil

#4

[quote]I can’t do this as I don’t have access to create temporary dump files on the server.

[/quote]

What exactly do you need to do? Why can’t you create temporary dump files on the server using mysqldump?


#5

Just tried ‘mysqldump’ and it will not let me do it. ‘There’s an error in your SQL query at line …’

What I need to do is to export my database (I need to load it into an access database on Windows :-).

  • wil

#6

What command line are you doing (aside from the password of course)…

To dump the whole database, you’d do something like this:

mysqldump -uusername -ppassword databasename > file.sql

To select just certain tables is a bit trickier, but i’m pretty sure it’s possible (I think you use the --tables command line option).

Drop me an email (my email address should be pretty obvious; the username part is my full first name) if you have further problems with this and I’ll see what I can do.

In either event, show us (or me) the exact command you’re running (except for the password).

Don’t put spaces between the ‘-u’ and the username or the ‘-p’ and the password.