Hey folks, I just got this error today

Hey folks, I just got this error today Hyperdrive does not currently support MySQL multi-statement queries
(log) 🔍 SQL Query: select `id`, `email`, `name`, `google_id` from `users` where `users`.`email` = ? limit ?
(log) 📋 Parameters: [ 'muhajirframe@gmail.com', 1 ]
(log) 🔍 SQL Query: insert into `sessions` (`id`, `user_id`, `expires_at`, `ip_address`, `user_agent`, `payload`, `last_activity`) values (?, ?, ?, ?, ?, ?, ?)
(log) 📋 Parameters: [
'd76a430d62722d6e0bced8540fea85dc1e8d1cfe1dcf2127c1b462bed5f5b070',
6264,
'2025-07-01 02:05:50.340',
'2a09:bac5:3a11:18c8::278:7b',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36',
'{"userId":6264}',
1748743550
]
(error) 02:05:50 ❌ ERROR Google OAuth error
{
"error": "Hyperdrive does not currently support MySQL multi-statement queries",
"stack": "Error\n at PromiseConnection.query (server.js:68443:26)\n at MySql2PreparedQuery.execute (server.js:131993:32)\n at QueryPromise.execute (server.js:131405:27)\n at QueryPromise.then (server.js:126940:17)",
(log) 🔍 SQL Query: select `id`, `email`, `name`, `google_id` from `users` where `users`.`email` = ? limit ?
(log) 📋 Parameters: [ 'muhajirframe@gmail.com', 1 ]
(log) 🔍 SQL Query: insert into `sessions` (`id`, `user_id`, `expires_at`, `ip_address`, `user_agent`, `payload`, `last_activity`) values (?, ?, ?, ?, ?, ?, ?)
(log) 📋 Parameters: [
'd76a430d62722d6e0bced8540fea85dc1e8d1cfe1dcf2127c1b462bed5f5b070',
6264,
'2025-07-01 02:05:50.340',
'2a09:bac5:3a11:18c8::278:7b',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36',
'{"userId":6264}',
1748743550
]
(error) 02:05:50 ❌ ERROR Google OAuth error
{
"error": "Hyperdrive does not currently support MySQL multi-statement queries",
"stack": "Error\n at PromiseConnection.query (server.js:68443:26)\n at MySql2PreparedQuery.execute (server.js:131993:32)\n at QueryPromise.execute (server.js:131405:27)\n at QueryPromise.then (server.js:126940:17)",
7 Replies
Muhajir
MuhajirOP3mo ago
const connection = createConnection({
host: hyperdrive.host,
user: hyperdrive.user,
password: hyperdrive.password,
database: hyperdrive.database,
port: hyperdrive.port,

// Additional options for better performance in serverless environments
connectTimeout: 10000, // 10 seconds
waitForConnections: true,
multipleStatements: false,

// Required to enable mysql2 compatibility for Workers
disableEval: true,
})
const connection = createConnection({
host: hyperdrive.host,
user: hyperdrive.user,
password: hyperdrive.password,
database: hyperdrive.database,
port: hyperdrive.port,

// Additional options for better performance in serverless environments
connectTimeout: 10000, // 10 seconds
waitForConnections: true,
multipleStatements: false,

// Required to enable mysql2 compatibility for Workers
disableEval: true,
})
I can't any info about it on the internet, I checked drizzle, doesn't seems to make multiple statement anyone faced the smae issue
Isaac McFadyen
Isaac McFadyen3mo ago
?pii
SuperHelpflare
SuperHelpflare3mo ago
Please remove all Personally Identifiable Information (PII) from your post (this includes things like emails, phone numbers, addresses, etc.). This is a public Discord, you shouldn't share your personal information with tens of thousands of people. Your post will be removed if the PII is not edited out in a timely manner.
Isaac McFadyen
Isaac McFadyen3mo ago
Looks like you've got your email/IP there, you should probably edit that out.
AJR
AJR3mo ago
Ah. You're getting the wrong error message, that's a bug on our end, I need to go see why that's happening. The actual issue here is that we do not currently support prepared statements for MySQL
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
AJR
AJR3mo ago
The planetscale driver, or planetscale hosting? The planetscale driver has incredibly custom behavior and is not supported. Planetscale hosting, however, should work fine Also, both of the supported MySQL/MySQL2 drivers avoid prepared statements by default, so I'm not following on what you mean by avoiding them

Did you find this page helpful?