Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3605530
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:08:07+00:00 2026-05-18T21:08:07+00:00

This is a weird problem and I’m not sure what’s going on. I installed

  • 0

This is a weird problem and I’m not sure what’s going on. I installed MySQL on a linux box I have running Ubuntu 10.04 LTS. I can access mysql via SSH mysql -p and perform all my commands that way. I added a user, and I can use AddedUser to connect remotely from my machine, but not from the local machine. It makes no sense to me…

SELECT host, user FROM mysql.user Yields:

+-----------+------------------+
| host      | user             |
+-----------+------------------+
| %         | AddedUser        |
| 127.0.0.1 | root             |
| li241-255 | root             |
| localhost | debian-sys-maint |
| localhost | root             |
+-----------+------------------+

Problem is I’m developing on this machine using Node.js, and I can’t connect locally from the server using the same username. I’ve tried FLUSH PRIVILEGES but that seems to have no effect.

I know it’s not Node.js because I’m using the same code on another database and it’s working in that environment.

Edit

This is the error node is giving me.

node.js:50
    throw e; // process.nextTick error, or 'error' event on first tick
    ^
Error: ECONNREFUSED, Connection refused
    at Stream._onConnect (net.js:687:18)
    at IOWatcher.onWritable [as callback] (net.js:284:12)

Edit 2

I have the right port & server as best I can tell. My /etc/mysql/my.cnf contains this:

port            = 3306
socket          = /var/run/mysqld/mysqld.sock

My MySQL object contains:

{ host: 'localhost',
  port: 3306,
  user: 'removed',
  password: 'removed',
  database: '',
  typeCast: true,
  flags: 260047,
  maxPacketSize: 16777216,
  charsetNumber: 192,
  debug: false,
  ending: false,
  connected: false,
  _greeting: null,
  _queue: [],
  _connection: null,
  _parser: null,
  server: 'ExternalIpAddress' }

Possibly useful?

netstat -ln | grep mysql
unix  2      [ ACC ]     STREAM     LISTENING     1016418  /var/run/mysqld/mysqld.sock
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:08:07+00:00Added an answer on May 18, 2026 at 9:08 pm

    Connection Refused is being signaled at the TCP/IP protocol level, and means that your local connection attempt is using the wrong hostname and/or (more likely) port number.

    EDIT: Here’s another (admittedly low-probability) possibility:

    1. You have both host and server defined in the JS object, in which case node.js might give precedence to server.
    2. If the externalIPaddress is on the other side of a NAT firewall, the firewall may be (actually, should be) configured to discard incoming traffic to port 3306.
    3. When you try to connect, your packets are being routed to the NAT firewall first and are being discarded there.

    Verify that having both server and host set will not cause this problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a weird problem. I've mysql 5.1 installed on my ubuntu 9.04. I've used
I have this weird problem when trying to INSERT a row into my mysql
I have this really weird problem with my MySQL table. After some time a
I have this weird problem with setting up cookies with PHP. Everything worked fine
This is a weird problem. I have a solution for it, but I don't
I have a weird problem, and I don't know if this is the default
I have this weird problem where my Google Maps API script doesn't work, no
Recently I experienced this weird problem: while(list($key, $value) = each($array)) was not listing all
I have this weird problem as to how to name objects of a class.
I'm hoping to get some help with this weird problem. We're running the Jacorb

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.