MySQL Forums
Forum List  »  MySQL Workbench

Re: 1045 Access denied ODBC@localhost using Windows Task Scheduler
Posted by: Mattias Molen
Date: June 15, 2017 04:19AM

Just solved my problem. Might be the same solution for Windows. I was reading this:
http://www.ryadel.com/en/mysql-secure-alternative-to-include-the-password-in-command-line-scripts-using-mysql_config_editor-and-host-alias/

The last sentence says: ...the host aliases are stored in an encrypted login file named .mylogin.cnf, which is located in the \%APPDATA%\MySQL folder on Windows systems and in the current user’s home directory on non-Windows systems.

By default a LaunchDaemon runs under root, therefore it failed because it couldn't find the .mylogin.cnf file. I had to specify the right user in the LaunchDaemon and got it working. Maybe in Windows the scheduled task is running under a user (ODBC?) who somehow can't reach the \%APPDATA%\MySQL folder.

Options: ReplyQuote




Sorry, only registered users may post in this forum.

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.