Running MySql version 5.6.17 on a ML350 G5 server. The operating system is Small Business Server 2008
Please understand I am learning Mysql . I am not an expert.
I am trying to import a text file using mysqlimport utility.
The command is below:
mysqlimport --user=root –password=dbxxx --fields-terminated-by=”,” --lines-terminated-by=”\n” pivot D:\Invest-Import-Data\tblpivottxt.txt
The problem:
When I put the above command into a batch file mysql displays the error:
“Error 1045 Access denied for user 'root @ localhost' (using password NO)
So I created a batch file which would change directory to the path where mysql exists . The path is:
c:\program files\Mysql\Mysql server 5.6\bin
Then I manually typed the mysqlimport command above and the data successfully imported
Questions:
Q1.) I have attached the batch file and the txt file and the table structure. What changes would you make to this batch file so I don't have to manually type the mysqlimport command?
Q2.) What must I do so the password does not have to be entered as part of the mysqlimport command?
Please give detailed answers. I am not a mysql expert.
Useful links are always appreciated.
Our community of experts have been thoroughly vetted for their expertise and industry experience. Experts with Gold status have received one of our highest-level Expert Awards, which recognize experts for their valuable contributions.
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
Jim Murphy
Programmer at Smart IT Solutions
When asked, what has been your best career decision?
Deciding to stick with EE.
Mohamed Asif
Technical Department Head
Being involved with EE helped me to grow personally and professionally.
Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question
Connect with Certified Experts to gain insight and support on specific technology challenges including: