I am trying to integrate DB steps with one of our release process where we are planning to get a dump from Production DB and restore it Stag DB. We are using MySQL 5.7 as backend and we face 2 problems here.
Problem #1:- Deployment steps show as a failed when command throws warning message.
I am trying to run “mysqldump -h x.x.x.x -u myuser -pmypassword --databases mydb > db.sql” and it works well on terminal but yes it give us a warning but DB dump successfull. When I put same command on “Run a scipt” task than it’s gives a warning message and task marked as failure.
Problem #2:- Error message Access denied for user ‘ODBC’@‘localhost’.
To avoid first problem, we are using “mysql_config_editor” where we are creating login profile and it works as expected on termincal/cmd but when we run this command “mysqldump --login-path=myProfile --databases myDB > C:\MySqlDump\myDB.sql” than it gave us above error which means it doesn’t pick my login profile that’s why it’s connect through default user which is “ODBC”
The Octopus Server user can be configured in the same way the Tentacle user is configured, through Services.msc. By default it is using the Local System account. If you are not comfortable changing the Octopus Server user, you could install a Tentacle on the Octopus Server machine and configure the user for that account.