PDA

View Full Version : exporting files from telnet?


HL-Hosting
09-10-2003, 09:46 PM
Hey,

I am trying to export the database files off the old hard disk by putting them in the ftp folder and downloading them. I got an error:
550 mantis_bug_file_table.MYD: Permission denied.

Is there an easier way to get the old database (download them) and upload it back on to the new server?

mysql: var\lib\mysql

Roman

DirectAdmin Support
09-10-2003, 09:53 PM
Hello,

I wouldn't copy the file directly, a) because you can't, you don't have permission unless you are root, b) there are other method available.

From ssh, I'd use mysqldump (the same command DA uses to export databases)/usr/bin/mysqldump -uusername -p --add-drop-table --all --extended-insert --quick --no-create-db databasename > output_file.sql

John

HL-Hosting
09-10-2003, 10:13 PM
I did:

/usr/bin/mysqldump -u roman -p --add-drop-table --all --extended-insert --quick --no-create-db databasename > output_file.sql

Then:

Error 1044 Access denied for user: 'roman@localhost' to database 'databasename' when selecting the databse.


What database?


Roman

l0rdphi1
09-10-2003, 11:16 PM
I think you need to use /usr/bin/mysqldump -uroman -p{your_password} --add-drop-table --all --extended-insert --quick --no-create-db databasename > output_file.sql

DirectAdmin Support
09-11-2003, 12:04 AM
Hello,

"databasename" should be replaced with the name of your database... ie: "roman_bugsdb" or whatever you callled it. It will start with your DA username.

If you use -p without the password, it will ask you for the password from stdin, so that other people on the server won't be able to do a "ps -ax" and see your password ;)

John