You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Status: Downloaded newer image for ghcr.io/teamhanko/hanko:latest
2024/11/23 11:10:21 migrate up
2024/11/23 11:10:21 Using config file: ./config/config.yaml
[POP] 2024/11/23 11:10:21 info - 0.0009 seconds
2024/11/23 11:10:21 Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: dial tcp [::1]:3306: connect: connection refused
I tried with my external database, with a docker mysql database, nothing is working. I have also tried to use the url config:
database:
url: "mariadb://hanko:MYPASS@localhost:3306/connections"user: hankopassword: MYPASShost: localhost # change this if the DB is not running on >port: "3306"database: connectionsdialect: mariadb # depending on your choice of DB: postgr>
But I have:
the URL 'mariadb://hanko:MYPASS@localhost:3306/connections' is not supported by MySQL driver: default addr for network 'localhost:3306' unknown
Reproducing the bug
Create the config.yaml like stated above
Create a mysql container with docker or podman (I tried both)
I can fix by using unix socket instead of tcp: mysql://supertoken:MYPASS@unix(/run/mysqld/mysqld.sock)/connections
I achieved to get the mysql driver fixed but I still has some errors.
2024/11/23 17:49:19 error executing migrations/20220405153240_create_users.up.fizz, sql: CREATE TABLE `users` (
`id` char(36) NOT NULL,
PRIMARY KEY(`id`),
`email` VARCHAR (255) NOT NULL,
`verified` bool NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL
) ENGINE=InnoDB;
CREATE UNIQUE INDEX `users_email_idx` ON `users` (`email`);: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE UNIQUE INDEX `users_email_idx` ON `users` (`email`)' at line 9
And the log:
supertoken,localhost,288,11246,QUERY,connections,'CREATE TABLE `users` (\n`id` char(36) NOT NULL,\nPRIMARY KEY(`id`),\n`email` VARCHAR (255) NOT NULL,\n`verified` bool NOT NULL,\n`created_at` DATETIME NOT NULL,\n`updated_at` DATETIME NOT NULL\n) ENGINE=InnoDB;\nCREATE UNIQUE INDEX `users_email_idx` ON `users` (`email`)',1064
Checklist
Describe the bug
Hello I'm following the README: https://github.com/teamhanko/hanko/blob/main/backend/README.md#running-the-backend and on this command:
docker run --mount type=bind,source=<PATH-TO-CONFIG-FILE>,target=/config/config.yaml -p 8000:8000 -it ghcr.io/teamhanko/hanko:latest migrate up
I got :
I tried with my external database, with a docker mysql database, nothing is working. I have also tried to use the url config:
But I have:
Reproducing the bug
Logs
No response
Configuration
No response
Hanko Version
sha256:accccb4946e25017133d428b1bb8a2cc17c6f76ea3928862c1617c7b0f809d98
OS Hanko Backend
Linux
OS Version Hanko Backend
Debian GNU/Linux trixie/sid x86_64
OS
Linux
OS Version
Debian GNU/Linux trixie/sid x86_64
Browser Version
No response
Environment
None
Additional Context
I've also disabled the firewall, check the tcpdump. I don't see any attempt to connect anywhere... Connecting with mysql bash works like a charm.
The text was updated successfully, but these errors were encountered: