Hello everybody,
The problem is the following, I developed an application with access to a mysql database, defined the access in the settings:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': 'nfcReader/my.cnf',
},
},
}
the file has the accesses and it works, when I deployed it to apache 2 I stopped getting access to the database.
Syslog error:
Feb 16 16:07:10 raspberrypi mariadbd[693]: 2023-02-16 16:07:10 95 [Warning] Access denied for user 'www-data'@'localhost' (using password: NO)
apache config:
Alias /static /var/www/nfcReader/static
<Directory /var/www/nfcReader/static>
Require all granted
</Directory>
<Directory /var/www/nfcReader/nfcReader>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
# WSGIDaemonProcess inov python-path=/var/www/nfcReader python-home=/home/inov/env
#WSGIProcessGroup inov
WSGIDaemonProcess inov python-path=/var/www/nfcReader python-home=/home/inov/env
WSGIProcessGroup inov
WSGIScriptAlias / /var/www/nfcReader/nfcReader/wsgi.py
All works less the database connection, the user should stay the same? in th conf file i defined other user not the www-data
Any ideas?
best regards