PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 23, 2022

[FIXED] Cannot Connect To MySQL - Cannot Find Mysql.sock Phpmyadmin Error #2002

 January 23, 2022     phpmyadmin     No comments   

Issue

I have been working on a mysql database that I set up with phpmyadmin... I copied the database on my server to a different directory on my mac server so a website I am developing can access it... When I changed the MySQL setting in Server Admin to the new directory location, it could not connect to the database anymore, after I saved and restarted the service. I have rebooted the server as well.

I did not alter any files as I copied them to the directory of my website.

Seeing as that did not work, I put the setting back to the default directory of /var/mysql , then saved & restarted the service.

In the Overview of Server Admin, it states: MySql Service is: Shutting Down. I have tried: clicking start MySQL at the bottom (the program is responding), restarting the service, removed and added the service, and changed the permissions of the /var/mysql folder.

When I try to access mysql through phpmyadmin in a web browser, I get: #2002 Cannot log in to the MySQL server.

I figure the MySQL server did not start and is having a problem doing so. From my research on the web I need to verify that mysql.sock exists in the /var/mysql dir.... which it does not. I did a search of my mac and could not find it. I do not wish to reinstall this as I shouldn't have to.

In terminal, I have tried this: mysqladmin restart mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)' Check that mysql is running and that the socket: '/var/mysql/mysql.sock' exists!

Any Ideas?? Everything is up to date as well.

Thanks


Solution

Sadly, I just reinstalled mySQL package on that server, and didn't touch phpmyadmin and it worked. Thank you for the input though



Answered By - Zero
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing