prisma: `thread 'tokio-runtime-worker' panicked at 'Could not retrieve alloc::string::String from Value'`
Bug description
datasource db {
provider = "mysql"
url = "mysql://xxxx:xxxxx@rm-xxxxxx.mysql.rds.aliyuncs.com:3306/xxxxx"
}
thread 'tokio-runtime-worker' panicked at 'Could not retrieve alloc::string::String from Value',
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: PANIC: Could not retrieve alloc::string::String from Value
What is wrong?
How to reproduce
Expected behavior
No response
Prisma information
// Add your schema.prisma
// Add your code using Prisma Client
Environment & setup
- OS:
- Database:
- Node.js version:
Prisma Version
4.14.1
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 28 (12 by maintainers)
@Jolg42 “5.6.16-log” is a version of MySQL database. In this version number, “5.6.16” represents the major and minor version, while “-log” indicates that it’s a version compiled with logging enabled. just chatgpted.
It has nothing to do with specific schema and invocation methods. The reason is that when the query engine initializes the database connection, it will query the socket variable. Turning off this option is sufficient by adding the parameter
prefer_socket=false.DATABASE_URL:
mysql://{username}:{password}@{host}:{port}/{db}Change it to:mysql://{username}:{password}@{host}:{port}/{db}?prefer_socket=falseRelated Documentation: https://open.oceanbase.com/blog/15137753618
yes!!! first of all, I used my local mysql (macOS), It works EVERYTHING FINE!, and now I use alibabacloud version mysql, And got this error… That’s too weird
@Jolg42 I think so, because I copied the data to the 8.0 version and it was no problem. But I remember that there was another version of mysql, and I copied it in, the same problem still occurred, so I thought it was a data type or a character type problem. 5.6.16-log is just an version of mysql. I think maybe cloud service providers in China like alibaba RDS used it more.
@jhd4tmr So you think this is related to your database version? @godkillCK What’s your MySQL version in your case?
It would be interesting/helpful if you could try a reproduction using a docker image, the oldest MySQL 5.6 still around in the official images is
5.6.17, close enough for attempting reproduction I think. https://hub.docker.com/layers/library/mysql/5.6.17/images/sha256-975493e932282469fac15ffb69aafca329387440baf9a516f46eb6eda49caf51?context=exploreAlso, did you try using a more recent version of MySQL 5.6? (It looks like the most recent is
5.6.51) And finally, any idea what-login5.6.16-logmeans?