skip to Main Content

docker-compose: Unable to connect app service to mysql database, receive "Error: Access denied for user 'root'@'localhost' (using password: YES)

I am starting two docker containers through docker-compose. The contents of docker-compose.yml file: version: "3.7" services: app: image: my-app:latest ports: - 8000:8000 working_dir: /usr/app/MyApp environment: MYSQL_ROOT_PASSWORD: myawesomepassword MYSQL_DATABASE: myawesomedb MYSQL_USER: root MYSQL_PASSWORD: myawesomepassword mysql: image: mysql:5.6 volumes: - db-data:/var/lib/mysql environment:…

VIEW QUESTION

Random mysql crash when closing a statement

I have the following code: Statement statement =createStatement(); try (java.sql.ResultSet resultset = statement.executeQuery()) { while (resultset.next()) { myObject.setProcessingDate(resultset.getDate(1)); myObject.set... } }finally { if (statement != null) { statement.close(); } } I know that statement object should be created in the…

VIEW QUESTION
Back To Top
Search