Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

290
Visualizações
After connecting to MySQL database, I'm getting "Error: Got packets out of order"

Currently I am trying to set up a simple REST API using Deno and MySQL. After succesfully creating database, table and inserting some values into it, I'm failing with getting those values from the Deno side. Here is my code:

import { Client } from "https://deno.land/x/mysql/mod.ts";

const client = await new Client().connect({
   hostname: "127.0.0.1",
   username: "root",
   port: 3306,
   db: "testDatabase",
   password: "",
});

await client.execute('use Ponys');

await client.query('SELECT * FROM Students');

After execute/query I always get this messages:

INFO connecting 127.0.0.1:3306 INFO connected to 127.0.0.1 Error: Got packets out of order

I'm running the app with this command:

deno run --allow-all index.ts

My local SQL server is running all the time.

Can you help find me the answer why I cannot get the values? Thanks!

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

According to the developer, it's a bug.

https://github.com/manyuanrong/deno_mysql/issues/16

More specifically...

https://github.com/manyuanrong/deno_mysql/issues/16#issuecomment-639344637

Prepare for the current crushing reality of Deno not yet possessing a functional mysql driver. It doesn't support passwords!

But when it does man... but when it does, it will soon be a one stop shop of awesomeness.

Just imagine... Beastly NGINX as the SSL Proxy, Single file Deno as the runtime Gateway and MySQL as the relational database running spectacularly in a Digital Ocean $5.00 Droplet..

I simply cannot wait.

over 4 years ago · Santiago Trujillo Relatório

0

If you making SQL requests after a long period of time - you can get a same issue.

Fix of that possible by tune this values in mysql service config:

interactive_timeout

wait_timeout

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda