connection refused mysql node.js - mysql

I've tried everything under the sun to fix this problem, nothing works!
I'm trying to connect to mysql using node.js.
I've tried both normal connections and pool connections, but I keep getting the following error:
"connect ECONNREFUSED"
I'm working on a Windows 7.
There are many similar questions to this on Stack Overflow, and everyone mentions the mysql configuration file (and commenting out "skip-networking"), however, I can't find where the file is (the mysql module was installed under node_modules).
I've tried looking for my.ini and my.cnf, there don't seem to be on my machine either.
Is there a way to try to log in to mysql via the command line?
It seems like there isn't since the command line doesn't recognize the command "mysql".
I'd post the code that I've been using but that wouldn't help, since I've been using dozens of different alterations, and all fail.
Thanks in advance, I appreciate the help!

Thanks to Салман, I realized that I need to install the actual MySQL server as well.

Related

First time using phpMyAdmin but getting multiple error messages about invalid connection and don't know where to start

screenshot
I am unable to connect to phpMyAdmin. This is my first time using it. These are all the errors I am getting, but I don't understand what any of them mean.
I installed XAMPP, ran Apache and MySQL, selected Admin, but then I get these errors in the screenshot attached.
I am completely new to this. I've been trying to follow a beginner guided project for MySQL on Udemy and the instructor is using phpMyAdmin. But, I couldn't find any instructions on how to install it and so I tried googling it and figuring it out myself. I looked at similar problems posted on here, but I honestly don't know where to start. Any suggestions? Or at least where to start?
I tried going into Config to check host, username, and password, but I am not sure what to look for and how to repair the problem.
I had MySQL Installer - Community and installed MySQL Workbench, MySQL Connector and MySQL Server prior to installing and using XAMPP. I was wondering if that was the problem so I uninstalled all of them, but I got the same errors anyways.

connect Docker Superset to a Windows Local Database

on my Windows 10, I have Apache-Superset container running on Docker Desktop.
and also I have installed PostgreSQL ver.12 and myQSL ver.8 too.
now, in the SQLAlchemy I cannot connect to any of them! adding a Database/Datasource
I've tried many ways, in Superset Doc(s) and other forum suggestions too.
postgresql://username:password#localhost:5432/dbName
postgresql://username:password#127.0.01:5432/dbName
mysql://username:password#localhost:5432/dbName
mysql://username:password#127.0.01:5432/dbName
every time I get this error:
ERROR: Connection failed, please check your connection settings.
I just need an empty Database to be able to add a CSV file to.
many Thanks! in advance.
this is definitely a complex and unique setup! (Superset isn't supported on Windows, so Docker is definitely the way to go if you need to use Windows).
The main thing to understand is that the networking for your windows database server is different from the network within Docker. This is a common confusion actually, but Docker has some escape hatches for you:
https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds
this is the Solution!
instead of "LocalHost" or "127.0.0.1" for addressing the Database-M.S.
you should put this: "host.docker.internal"
that's all.

phpMyAdmin error with XAMPP

For the first couple days of using XAMPP for Mac, I was successful in beginning to learn MySQL via phpMyAdmin. Then, it randomly stopped letting me log in, displaying the following error:
phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
I've checked other forums, and they have not helped at all. I'm new to all of this, so I don't know much about anything regarding this, I've only used the program for about a day. PLEASE HELP!
Thanks in advance for any help!
First you should check if mysql is running. If it is, post your Serverlog, without it we cannot help you in any way.

Sphinx searchd issues when running on Windows Server

I am using sphinx to index my content. I used it in my development environment (xampp) and it worked fine. Now I took it to the server (same config file), and it is giving me trouble.
I have a VPS Windows 2008 server with Plesk panel. I am the administrator. the problem is that when i run the indexer tool, it tells me that it found 0 docs and indexing 0 docs. So it seems like it is working fine as far as accessing the database, but it just doesn't find any docs. Does anyone have any ideas, I spent a whole day playing with the configuration and database with no success.
Thanks.
Well maybe the database table that sphinx is trying to index is empty?
Either way would suggest adding debug command line switches when you run indexer. Eg --verbose, --print-queries etc. They will probably give you a better clue where the problem lies.

MySQL not connecting with PHP

I installed MySQL server and everything worked fine in command line. I worked connecting MySQL to my ASP.NET application and there is no problem at all. But when I try to connect MySQL to PHP applications I am unable to connect. When I installed PHPMyAdmin I am getting error #2002 Connot log in to thie MySQL server
I browsed all the night for this error and none of Google's results helped me! :(
Anybody can you please tell me where the problem is at? I believe I must change my PHP.ini file settings in order to connect to MySQL. Anybody please help me.
There are a lot of things that can cause this type of issue. Did you make sure that you have added php-mysql drivers to your sever. Since you said your using ASP i will assume that you are using windows servers. Make sure that you also are allowing that user to connect via localhost or what ever ip the PHP is on.
In php there are to standered ways of connecting to a MySQL database.
php-mysql(is going to be depercated soon).
php-mysqli(OOP version of the php-mysql with lots of features).
With out one of these php will be unable to work with a MySQL database. I am not sure if phpmyadmin works with both drivers or just one of them It could be throwing a die("message") Just to let you know it is not working instead of throwing a more complex php error. You may want to see if you can incress error reporting.
You can check if your php installastion has the mysql driver by looking in your php.ini and also checking with.
phpinfo();
It is almost always about config. https://bbs.archlinux.org/viewtopic.php?id=90133