Closed jabarihunt closed 4 days ago
Began working with Bun ~1.5~ 1.0.5.
bro is living in the future. we're on bun v1.0.22, he's already on v.1.5.
nah but fr, im on the latest verison of bun and mysql2 and im getting the same error. it's strange asf, im migrating a nextjs api to bun (with hono and drizzle orm). mysql2 connects fine when running in nextjs, but not on my dedicated bun backend. i've checked the environment variables, and there's nothing wrong there.
could it be something with the database server (im hosting it on aws rds)? are there any weird sneaky headers that are being included that rds doesn't like or what?
@Balazs-topg bro is living in the future. we're on bun v1.0.22, he's already on v.1.5.
😆 Corrected! Not sure why it's not working for you, maybe it was fixed then broken again in a later update.
I'm getting the same issue on latest version whilst trying to use mysql2 in a SvelteKit application. Works fine if I just run it with Node.
i fixed it by moving my database from AWS RDS to railway.app, im still not sure what the actual root cause was though
I ran into this problem recently, not only using mysql2
package, but using mysql
as well.
With mysql2
, the connection times out. With mysql
it hangs indefinitely when establishing the connection.
having the same issue right here. But at the same time not. Im using bun v1.1.13 and mysql2 to make an api with hono dev. The thing here is its works when i run the whole api, but if i try to run a single ts script, the console show this:
UPDATE : So, I was testing on ubuntu 22.04 / MySQL 8.0.37
But after testing on macOS 14.5 / MySQL 5.7.24 8.3.0, it worked fine:
EDIT : both systems running Bun v1.1.18
EDIT 2: it appears the MySQL server on my macOS system is actually 8.3.0 (for whatever reason mysql -V
reported a different version string than SELECT @@version;
)
Cannot reproduce this in the currently version of bun if you still facing this issue please reopen.
What version of Bun is running?
What platform is your computer?
Darwin 22.6.0 arm64 arm
What steps can reproduce the bug?
What is the expected behavior?
What do you see instead?
Error: Access denied for user 'user'@'xx.xxx.xx.xxx' (using password: YES)
I have double checked the credentials for both instances. I can connect with my credentials using local GUI tools as well (Beekeper, TablePlus, etc).
Additional information