Where is a mysqld.sock?

Iadded mysql to package.json, but I get an error “ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)” when I try to start it. I cannot use it.
What should I do?

This happens sometimes, can you share your full code?

  "name": "textbook",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "start": "node app.js",
     "test": "echo \"Error: no test specified\" && exit 1"
  "repository": {
    "type": "git",
    "url": "git+https://github.com/.../.....git"
  "keywords": [],
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/.../.../issues"
  "homepage": "https://github.com/.../...',
  "dependencies": {
    "express": "^4.17.1",
    "mysql": "^2.18.1",
    "npm": "^7.11.1"

This is a package.json code. I don’t know how to access a MySQL in Glitch.

Can you open your terminal and type mysql -u root?

I typed it, but I get the same error message.