I'm trying to copy a database from one user to another, and it's been a little bit of a nightmare..
The database is larger than 8MB, so I couldn't use phpmyadmin, which is what I'm used to.
I've been following this guide here:
http://wiki.dreamhost.com/Restore_SQL_backup - Alternate Instruction section.
Using Putty, I managed to dump the data out alright, but couldn't manage to import the database back into mysql.
The error message I see : "No such file or directory"
I think it's probably coz I've not put the right path for the backup file.
Here's what I've done: (not real data, obviously)
- create a user (to login to ftp, shell, etc) called "ftpuser"
- create a new mysql database user called "dbuser"
- create a new mysql database called "db"
- log in to ftp as "ftpuser"
- put a copy of the sql file to be imported, dbdump.sql on the root (of the user)
- run putty, log in as "ftpuser"
type the command:
mysql -u dbuser -p dbpassword -h mysqlhost db < dbdump.sql
Error: No such file or directory
(I've confirmed that the file name is correct)
tried moving the dbdump to a folder (ftpuser/foldername) and use this command
mysql -u dbuser -p dbpassword -h mysqlhost db < ftpuser/dbdump.sql
I've googled and read other instructions, but still couldn't work it out.
Any help would be appreciated.
p.s I have very very basic understanding of mysql and ssh, so a more detailed explanation would be great.
Thanks in advance