{ "errors": [ { "message": "Unexpected...
# orm-help
d
{ "errors": [ { "message": "Unexpected error.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "users" ], "extensions": { "originalError": { "message": "\nInvalid
prisma.user.findMany()
invocation:\n\n\nAuthentication failed against database server at
localhost
, the provided database credentials for
root
are not valid.\n\nPlease make sure to provide valid database credentials for the database server at
localhost
.", "stack": "Error: \nInvalid
prisma.user.findMany()
invocation:\n\n\nAuthentication failed against database server at
localhost
, the provided database credentials for
root
are not valid.\n\nPlease make sure to provide valid database credentials for the database server at
localhost
.\n at RequestHandler.handleRequestError (D:\\prisma\\es-app\\node_modules\\@prisma\\client\\runtime\\index.js2991513)\n at RequestHandler.request (D:\\prisma\\es-app\\node_modules\\@prisma\\client\\runtime\\index.js2989212)\n at async PrismaClient._request (D:\\prisma\\es-app\\node_modules\\@prisma\\client\\runtime\\index.js3086416)\n at async Object.users (webpack-internal:///(api)/./pages/api/graphql.ts7828)\n at async Promise.all (index 0)\n at async file///D/prisma/es-app/node_modules/@envelop/core/esm/orchestrator.js37727\n at async processRequest (file///D/prisma/es-app/node_modules/@graphql-yoga/common/esm/processRequest.js2320)\n at async YogaNodeServer.getResponse (file///D/prisma/es-app/node_modules/@graphql-yoga/common/esm/server.js31328)\n at async YogaNodeServer.YogaServer.handleRequest (file///D/prisma/es-app/node_modules/@graphql-yoga/common/esm/server.js6930)\n at async YogaNodeServer.handleIncomingMessage (file///D/prisma/es-app/node_modules/@graphql-yoga/node/esm/index.js5326)" } } } ], "data": null }
r
Hi @doddy nicolas 👋 From the error message, the provided credentials for
root
are not valid
Check to ensure you are using valid database credentials
d
sure that 's valid
r
but the error message thinks it's not valid
Copy code
Authentication failed against database server at `localhost`, the provided database credentials for `root` are not valid.\n\nPlease make sure to provide valid database credentials for the database server at `localhost`.\n
d
can you take my sceen control please?
screen
v
👋 Hello @doddy nicolas, at present providing that level of support support (i.e. jumping on a call and taking screen control) is out of our scope as an Open Source company 😅 However, we'd be happy to continue helping you here! Are you still having this problem with the database?
d
yes i do
v
Is it still giving you the same error message, no matter what authentication you try?
r
Also which database are you using. Can you connect to it locally without using prisma?
d
yes i'm using mysql and i can connect to it with vscode and prisma studio
r
can you share your connection string?
d
generator client { provider = "prisma-client-js" } datasource db { provider = "mysql" url = env("DATABASE_URL") }
resolvers: { Query: { hello: () => 'Hello from Yoga!', users: async(__: any,_: any) => { return await prisma.user.findMany() }, books: () => books, }, },
r
Thanks for sharing @doddy nicolas. From this related issue, i think we need to check how many instance of mysql you have running on your local system. Also are you using docker
d
no docker and just one instance of mysql i guess
how to check instance of mysql
r
Can you switch to mysql shell and type this command
Copy code
show variables where Variable_name like '%host%';
then share the output with me
Also, Can you try to connect to the server from the same location you are trying to use Prisma
d
just here resolvers: { Query: { hello: () => 'Hello from Yoga!', users: async(__: any,_: any) => { return await prisma.user.findMany() }, books: () => books, }, },
how come with prisma studio connection works
is that a problem coming from nextjs ?
r
It's hard to tell at the moment. Can you share a minimal repository with me so i can try reproducing this issue?
Also can you please use the db connection string in place of your local mysql connection string
<mysql://lime_visible_ebba>:N|<mailto:xXyAOPI0@mysql-db-provision.cm0mkpwj8arx.eu-central-1.rds.amazonaws.com|xXyAOPI0@mysql-db-provision.cm0mkpwj8arx.eu-central-1.rds.amazonaws.com>:3306/moccasin_cat
Hi @doddy nicolas, can you let us know if you still need help with this or you are all set?