Are you trying to move or copy a database from one machine to another?

If so this may help - 

to back up or transfer a database
open terminal window
$ mysqldump -u username - p databasename > backupfilename.sql
type password when prompted

to install on another pc
copy the file across
open terminal window
cd to directory containing the file
$ mysql -u username -p
type password when prompted
mysql> use databasename;
note - if the database does not exist you need to create it with 
        mysql> create database databasename;
mysql> source backupfilename.sql;

this will create all tables, views and load all of the data from the old
database

Hope that helps

Mick

On Sat, 2010-05-22 at 12:25 +0000, pirate_lenny wrote:
>   
> I'm trying to import a SQL file full of UPDATE statements to my
> database. My web host is absolutely no help at all. I've done this
> before and someone helped me find a command that worked. But four
> months later, I've obviously forgotten.
> 
> This is what they're suggesting that I use: mysql -p -u username
> database_name < file.sql
> 
> So, I log in, cd to the directory where the file is stored, and run
> the above command. It asks for my password and nothing happens.
> 
> Am I doing something wrong?
> 
> 
> 
> 
> 

Reply via email to