Answer the question
In order to leave comments, you need to log in
How to fix database connection error after migrating Redmine?
Transferred redmine from one server to another. Launched application on Debian 8, Apache 2.4 + mod_passanger. The database does not live on another server. Here is database.yml
production:
adapter: mysql2
database: dbname
host: 192.168.x.x
username: login
password: "password"
encoding: utf8
Mysql2::Error (Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)):
app/models/user.rb:264:in `check_password?'
app/models/user.rb:170:in `try_to_login'
app/controllers/account_controller.rb:183:in `password_authentication'
app/controllers/account_controller.rb:178:in `authenticate_user'
app/controllers/account_controller.rb:32:in `login'
<VirtualHost *:80>
DocumentRoot /var/www/redmine/public
ServerName redmine
ErrorLog /var/www/redmine/error_log
CustomLog /var/www/redmine/access_log common
<Directory /var/www/redmine/public>
RailsEnv production
Options FollowSymLinks
RailsBaseURI /
PassengerResolveSymlinksinDocumentRoot on..
AllowOverride All
</Directory>
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
It's just that the app is launched not in production mode, but in some other way.
Try to add RailsEnv production
my config in VirtualHost'a config like this
<VirtualHost *:80>
ServerAdmin [email protected]
Servername example.com
DocumentRoot /var/www/html/
PassengerUser redmine
<Location /redmine>
RailsEnv production
RackBaseURI /redmine
Options -MultiViews
</Location>
</VirtualHost>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question