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!