Capistrano deploy: access denied for user "root" @ "localhost" (using password: YES) (Mysql :: Error)

I tried to deploy the ror application on a production server and then got this error:

Access denied for user 'root' @ 'localhost' (using password: YES) (Mysql :: Error)

but when I ran the command:

rake db: migrate RAILS_ENV = production

he passed. I also connect to mysql from the command line:

mysql -u root -p 

he passed, and I see that all tables are created.

im works on a branch, in my deploy.rb I already installed the branch:

set: branch 'myBranch'

and in apache2 configuration file, I also set rails_env:

<VirtualHost *: 80>
  ServerName daemon.com
  DocumentRoot / home / hy / work / log / current / public /
  RailsEnv production
</VirtualHost>

, , !

+3
2

, , , config/environment/production.yml .

, . , ?

(/////)

0

, , default_env deploy.rb .

- :

set :default_env, { 
  'var1' => 'value1',
  'var2' => 'value2'
}

Capistrano 3. , , .

0

Source: https://habr.com/ru/post/1752514/


All Articles