LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-29-2010, 08:19 AM   #1
Dryaf
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Rep: Reputation: 0
Mysql import


Hello

I have a file data.sql I want to update my database with.

Code:
mysqlimport -u username -p db_password databasename data.sql
It ask me for password, I guess it is for database password which is db_password I enter it again but I get error :

Code:
1045 Access denied for user 'username'@'localhost' (using password: YES)
I ask why it ask me for password because I am sure the password I have entered which is db_password is the right one also I have full privileges over this database.

Thank you
 
Old 01-29-2010, 08:28 AM   #2
idefiz
LQ Newbie
 
Registered: Jan 2010
Posts: 10

Rep: Reputation: 0
mysql -u username -p
enter
give password

what's the output?
 
Old 01-29-2010, 08:50 AM   #3
Dryaf
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Original Poster
Rep: Reputation: 0
When I do that I succeed to connect to mysql, I get message 'Welcome to MySQL monitor. Commands end with ...'.

Thank you
 
Old 01-29-2010, 08:50 AM   #4
Dryaf
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Original Poster
Rep: Reputation: 0
When I do that I succeed to connect to mysql, I get message 'Welcome to MySQL monitor. Commands end with ...'.

Thank you
 
Old 01-29-2010, 09:33 AM   #5
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
You can as well use this,

Code:
mysql -u username -p databasename < data.sql
Then enter the mysql password for the username. Initially you need to create the database.

--
Prasanta
 
Old 01-29-2010, 09:41 AM   #6
idefiz
LQ Newbie
 
Registered: Jan 2010
Posts: 10

Rep: Reputation: 0
mysqlimport -u root -p databasename data.sql

and then give password
 
Old 01-29-2010, 10:36 AM   #7
Dryaf
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for you both.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql import table, how? johnh10000 Linux - Newbie 1 09-09-2009 06:09 AM
MySQL Database Import ballistic509 Linux - Server 4 03-31-2007 01:26 AM
MYSQL Database Import Behrooz_Ice Linux - General 2 09-08-2006 04:15 AM
MySQL import database akines Linux - Software 3 04-19-2006 01:14 AM
how to import images into mysql x2000koh Programming 6 02-03-2005 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration