Comments (4)
I did some more tests by creating a new user. Everything OK, though I needed to change the value of verified
in the registered_user
table to make sure that the user could log in.
Docker logs:
2023-09-20 12:36:42 piglet-db | 2023-09-20 12:36:42 20 [Warning] Access denied for user 'root'@'192.168.16.1' (using password: YES)
2023-09-20 12:36:42 piglet-db | 2023-09-20 12:36:42 21 [Warning] Access denied for user 'root'@'192.168.16.1' (using password: YES)
2023-09-20 12:36:42 piglet-db | 2023-09-20 12:36:42 22 [Warning] Access denied for user 'root'@'192.168.16.1' (using password: YES)
2023-09-20 12:37:16 piglet | INFO: 127.0.0.1:37112 - "POST /admin/token HTTP/1.1" 200 OK
2023-09-20 12:37:16 piglet | INFO: 127.0.0.1:37114 - "GET /user/login-user HTTP/1.1" 200 OK
2023-09-20 12:37:16 piglet | INFO: 127.0.0.1:37118 - "GET /budget/ HTTP/1.1" 200 OK
So somehow I get 200 OK on requests, but now the database is claiming that root has not access to database. This is very weird as I am actually logged into the database using the root user and a third party application.
from piglet.
Logging in with admin@localhost
generated the following error in the Docker log:
2023-09-20 12:40:22 piglet-db | 2023-09-20 12:40:22 19 [Warning] Aborted connection 19 to db: 'piglet' user: 'piglet' host: '192.168.16.3' (Got an error reading communication packets)
from piglet.
Hey Ronny, i see. First of all currently i dont know why this login error message comes :) But here is an updated Version of the docker-compose and the .env file. Can you try it with them please?
And please be sure you delete the old mariadb data from your volume/mount.
docker-compose.yml
services:
piglet:
restart: unless-stopped
container_name: piglet
depends_on:
- database
ports:
- '0.0.0.0:80:80' # Piglet
- '0.0.0.0:8080:8080' # API
image: k3nd0x/piglet:latest
environment:
DB_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE} # Default 'piglet'
MYSQL_USER: ${MYSQL_USER} # Default 'piglet'
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_HOST: ${MYSQL_HOST}
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
database:
image: mariadb:11.1.2
container_name: piglet-db
volumes:
- database-data:/var/lib/mysql
environment:
MARIADB_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MARIADB_DATABASE: ${MYSQL_DATABASE}
MARIADB_USER: ${MYSQL_USER}
MARIADB_PASSWORD: ${MYSQL_PASSWORD}
volumes:
database-data:
.env
MYSQL_PASSWORD=piglet-123
MYSQL_USER=piglet
MYSQL_DATABASE=piglet
MYSQL_HOST=database
DOMAIN=localhost
SECURE_COOKIE=False
MYSQL_ROOT_PASSWORD='changeme'
For explanation:
The mariadb container changed and the MYSQL_ROOT_PASSWORD env variable are not longer working. So you have to set 'MARIADB_ROOT_PASSWORD'
These variables are creating the database at the container.
MARIADB_DATABASE: ${MYSQL_DATABASE}
MARIADB_USER: ${MYSQL_USER}
MARIADB_PASSWORD: ${MYSQL_PASSWORD}
In a few days there will be an updated version of piglet. I changed the startup procedure and and the database creation script to make the start smoother :) Thanks for your issue and keep me updated if it works with this changes.
from piglet.
Newest startup process should work
from piglet.
Related Issues (13)
- Site is flashing at reload, when darkmode is enabled
- Navbar pops up for a second when mini menue is active
- separate port for api and dashboard? HOT 2
- Access denied on database unable to login as admin HOT 12
- Quicken Import / PDF import / Online banking import
- Piglet is "waiting for database host" HOT 5
- API Class in Flask HOT 1
- If mail host not configured, dont try to send mails HOT 1
- Implement SQLite3 as database
- Budget sharing over registered user not only per mail
- CSV Import
- Scheduled Transactions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from piglet.