How do I import .sql file via SSH

 
Post new topic   Reply to topic    34SP.com Forum Index // Database Support
View previous topic :: View next topic  
Author Message
jonathanl
34SP Newbie
34SP Newbie


Joined: 13 Jun 2002
Posts: 12

PostPosted: Wed Mar 09, 2011 11:49 am    Post subject: How do I import .sql file via SSH Reply with quote
I have a large 250mb .sql file I need to import into my websites database.

Can you let me know what to write on the command line please.

I'm using

mysql -h 127.0.0.1 -u [username] -p [databasename] < data.sql

But I get Access denied for user '[username]@127.0.0.1' ( using password : NO)

[username] and [databasename] are both replaced with the correct details.
_________________
NewTime Systems - Custom Bespoke Software Development, Website Design & Search Engine Optimisation (SEO)
Back to top
View user's profile Send private message
jonathanl
34SP Newbie
34SP Newbie


Joined: 13 Jun 2002
Posts: 12

PostPosted: Wed Mar 09, 2011 4:17 pm    Post subject: Sorted Reply with quote
Sorted with the command line:

mysql -h 127.0.0.1 -u [username] -p[password] [databasename] < data.sql
_________________
NewTime Systems - Custom Bespoke Software Development, Website Design & Search Engine Optimisation (SEO)
Back to top
View user's profile Send private message
Post new topic   Reply to topic    34SP.com Forum Index // Database Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2002 phpBB Group