I am running an automated script that generates a CSV file from a query every 24 hours which works well, but I must use root login. As soon as I change it to the user login (who has the same rights to the schema as root) it gives me the error

mysql --user=xxx --password=xxx --database=xxx 0< ERROR 1045 (28000) at line 1: Access denied for user 'xxx'@'%' (using password: YES)

Any ideas

That happens to me from the command line if I misspell the user name or the password. Mysql is a little bit picky in that it distinguishes host % from host localhost Look here http://dev.mysql.com/doc/refman/5.1/en/grant.html (substituting /yourversion/ for the /5.1/ shown here... though most of them are very very similar.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.