Answer the question
In order to leave comments, you need to log in
Why does not want to connect to the MySQL database?
Please help me with connection problem. There is a VPS, a MySQL database is deployed on it, a user userdevel is created with a password of 0000 and full rights to the dbdevel database. When connecting to the database via the console, the connection is successful: mysql -u userdevel -p
On the same server, the Apache + Passenger bundle is deployed, a site has been created in development mode for online debugging of the deployed application:
# /etc/apache2/sites-available/devel-website.conf
<VirtualHost *:80>
...
PassengerAppEnv development
...
</VirtualHost>
default: &default
adapter: mysql2
pool: 5
timeout: 5000
host: 127.0.0.1
password: 0000
encoding: utf8
development:
<<: *default
database: userdevel
username: dbdevel
(I’ll say right away: replacing 127.0.0.1 with localhost in the host line did not help) Access denied for user 'userdevel'@'localhost' (using password: YES)
mysql> select user,host from mysql.user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| userdevel | % |
| debian-sys-maint | localhost |
| mysql.sys | localhost |
| root | localhost |
| userdevel | localhost |
| usertest | localhost |
| userwork | localhost |
+------------------+-----------+
7 rows in set (0.00 sec)
Answer the question
In order to leave comments, you need to log in
In the database, [email protected] and [email protected] are different users. You are explicitly told that
"Access denied for user 'userdevel'@'localhost' (using password: YES)"
That is, either there is no such user, or the password is different. Check the list of users and add rights to the corresponding user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question