Skip navigation links

MySQL Forums :: Newbie :: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)


Advanced Search

Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes)
Posted by: Mohsin Jessa ()
Date: January 12, 2009 05:46PM

What am I doing wrong here?

mysql> load data infile 'c:/from_excel.csv' into table from_excel fields terminated by ',' lines terminated by '\n' ignore 1 lines;

ERROR 1045 (28000): Access denied for user 'mojeeza'@'%' (using password: YES)
mysql> load data infile 'c:\\from_excel.csv' into table from_excel fields terminated by ',' lines terminated by '\n' ignore 1 lines
;
ERROR 1045 (28000): Access denied for user 'mojeeza'@'%' (using password: YES)
mysql> load data infile 'c:\\from_excel.csv' into table 'from_excel' fields terminated by ',' lines terminated by '\n' ignore 1 lin
es;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the rig
ht syntax to use near ''from_excel' fields terminated by ',' lines terminated by '\n' ignore 1 lines' at line 1
mysql> load data infile 'c:\\from_excel.csv' into table `from_excel` fields terminated by ',' lines terminated by '\n' ignore 1 lin
es;
ERROR 1045 (28000): Access denied for user 'mojeeza'@'%' (using password: YES)
mysql> load data infile 'c:\\from_excel.csv' into table `from_excel` fields terminated by ',' lines terminated by '\n' ignore 1 lin
es;
ERROR 1045 (28000): Access denied for user 'mojeeza'@'%' (using password: YES)



The same user (mojeeza) can insert and select from the table from_excel

mysql> select * from from_excel;
+-------+------------+--------+----------+--------+
| name | dob | gender | donation | member |
+-------+------------+--------+----------+--------+
| Abbas | 1982-12-10 | M | 300 | Y |
+-------+------------+--------+----------+--------+
1 row in set (0.00 sec)

mysql> insert into from_excel values ('Name1',date('2000-01-19'),'F',500,'N');
Query OK, 1 row affected (0.00 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from from_excel;
+-------+------------+--------+----------+--------+
| name | dob | gender | donation | member |
+-------+------------+--------+----------+--------+
| Abbas | 1982-12-10 | M | 300 | Y |
| Name1 | 2000-01-19 | F | 500 | N |
+-------+------------+--------+----------+--------+
2 rows in set (0.02 sec)

The file c:\from_excel.cvs is:

Name,DOB,G,Donation,Member
Mohsin,25-Jan-75,M,1000,Y
Maysam,25-Feb-91,M,0,Y
Arif,20-Mar-80,M,2000,Y
Fatima,01-Dec-60,F,200,N


From query browser, I can perform all dml against the same table from the same user.

I think I have to change the date format in the cvs file or perform date function conversions during the load, but I think I need to fix the access issue first.

Any help will be greatly appreciated.

Thanks

Options: ReplyQuote


Subject Written By Posted
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) Digital Surgeon 10/26/2005 05:03AM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) raul 10/26/2005 07:23AM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) rion jedi 11/16/2005 02:11PM
Solution on Win98 David Takle 11/16/2005 08:10PM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) rion jedi 11/16/2005 02:10PM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) Maneesh Prakash 11/23/2005 02:22PM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) Juan de Dios Palomo 11/23/2005 03:12PM
ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) amit tomar 03/24/2008 12:55AM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) no no 12/28/2008 02:57PM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) Mohsin Jessa 01/12/2009 05:46PM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) Mohsin Jessa 01/13/2009 01:14AM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) Mohsin Jessa 01/15/2009 09:32PM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: yes) Mohsin Jessa 01/15/2009 11:22PM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) grumman chan 11/25/2005 07:53PM
Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) santosh gire 12/10/2007 11:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.