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 7938545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:50:25+00:00 2026-06-03T22:50:25+00:00

I am having problem accessing my database, when I try to run mysql -h

  • 0

I am having problem accessing my database,

when I try to run mysql -h localhost -u root -p
and enter the password

I am recieving this kind of error

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Wonder why I get this.

When I type mysql --version

I have no error and got this msg: mysql Ver 14.14 Distrib 5.5.22, for debian-linux-gnu (x86_64) using readline 6.2

But when I type this comman mysql -v I got an error that says:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock' (2)

I thought mysql --version and mysql -v are desame

Any help will be much appreciated.

Thank you

  • 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-06-03T22:50:27+00:00Added an answer on June 3, 2026 at 10:50 pm

    I get that error when the MySQL service isn’t running. What OS are you on? I’m on Debian GNU/Linux, so I start the service with

    # service mysql start
    

    but other systems may use something different, like start or invoke-rc.d or something.

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

Sidebar

Related Questions

I'm having a problem accessing an object defined in the root package. If I
This may look a very basic question but I am having a problem accessing
Hi I'm having problem with accessing database from one of my site to another..
I'm having a problem parsing the JSON response from MySQL in Java. try {
i'm having problems with accessing my database from my server. i'm newbie in FT,
I am having a problem accessing a static const variable defined in my class
I am having a problem accessing the @attribute section of my SimpleXML object. When
I am having a problem accessing the ViewData object through javascript. I have set
I am having a problem accessing environment variables in a netbeans build.xml ant script.
I'm having trouble accessing a dataset. I've pulled data from an Access database (successfully

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.