I once had this problem and solved it by installing mysql-server
, so make sure that you have installed the mysql-server
, not the mysql-client
or something else.
That error means the file /var/run/mysqld/mysqld.sock
doesn’t exists, if you didn’t install mysql-server
, then the file would not exist. So in that case, install it with
sudo apt-get install mysql-server
But if the mysql-server
is already installed and is running, then you need to check the config files.
The config files are:
/etc/my.cnf /etc/mysql/my.cnf /var/lib/mysql/my.cnf
In /etc/my.cnf
, the socket file config may be /tmp/mysql.sock
and in /etc/mysql/my.cnf
the socket file config may be /var/run/mysqld/mysqld.sock
. So, remove or rename /etc/mysql/my.cnf
, let mysql use /etc/my.cnf
, then the problem may solved.
Related Posts:
- http://localhost/phpMyAdmin/ unable to connect
- How to log in to phpMyAdmin with WAMP, what is the username and password?
- phpMyAdmin Error: The mbstring extension is missing. Please check your PHP configuration
- phpMyAdmin: secret passphrase?
- Forbidden :You don’t have permission to access /phpmyadmin on this server
- MySQL Error #1133 – Can’t find any matching row in the user table
- phpmyadmin #1045 Cannot log in to the MySQL server. after installing mysql command line client
- mysql said: Cannot connect: invalid settings. xampp
- How to create a foreign key in phpmyadmin
- This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available
- importing a CSV into phpmyadmin
- MySQL: Can’t create table (errno: 150)
- MySQL: How to reset or change the MySQL root password?
- Delete a database in phpMyAdmin
- PHPMyAdmin Default login password
- MySQL Daemon Failed to Start – centos 6
- wamp server mysql user id and password
- phpmyadmin “Not Found” after install on Apache, Ubuntu
- Delete a database in phpMyAdmin
- Moving WordPress from MAMP to WAMP, can’t access pages
- Moving WordPress from MAMP to WAMP, can’t access pages
- Making someone a WordPress administrator using PhpMyAdmin
- What specific database privileges does WordPress need?
- “#1067 – Invalid default value for ‘post_date'” when trying to reset AI after backup
- Manually delete post from database
- Gaining Login Access via the Database
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- How to copy post titles to post slug in phpmyadmin
- Delete all post meta except featured image
- Export only pages and posts with mysql dump
- How to do a MySQL dump from production site without using a search and replace script for local development?
- Why am I unable to login to Dashboard after adding myself to admin via phpMyAdmin?
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Query to change custom post type with specific category
- How Do I Merge Categories With phpMyAdmin
- Emojis getting converted to “?”
- Resetting menu_order to 0 for posts in PHPmyAdmin?
- How to Create a Admin User for A WordPress Site via MySQL (PHPMyAdmin)?
- Delete all post meta except featured image Using SQL
- SQL error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’ [closed]
- Update slug (URL) of pending posts via phpMyAdmin
- Set meta_key and meta_value for all registered user in wordpress using sql query [closed]
- Can’t find my wordpress DB in phpmyadmin
- WordPress database import: Row size too large
- Delete all one-word comments
- Query to import data from one MultiSite table to another (pages/sub-pages)
- How to display data from custom table in wordpress phpmyadmin
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- Will changing the folder name two directories above a fresh wordpress installation break the site?
- Backing up and restoring multiple sites efficiently
- MySql query to get posts with all meta and terms
- $wpdb to insert html form information
- Changing root password in PHPMyAdmin for WordPress Database when going live
- Can’t update WordFence Options, clear data manually
- Broken wordpress site, non-working links and no access to wp-admin page
- Delete all pages (thousands) except a few by their IDs
- Setting up WordPress Locally on WAMP for a new site (with one already)
- Getting Error Trying to Create Table
- Export Yoast Keywords from MySQL/phpMyAdmin
- Editing mysql tables/database with wordpress or other app/cms
- Need to change all links in page content but not in post content
- Way to send multiple values for column to MySQL?
- Files on Localhost, Database on Server
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- List users with the most posts in the last 30 days
- Using mysql to replace img src?
- Installing local to live WP into subdirectory
- Recovering a wordpress blog that got corrupted
- Export SQL query based on custom field?
- Mysql Server keeps crashing
- Error establishing a database connection (Set-up locally)
- DB prefix not updating
- Delete all users with Editor role and their content mysql
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- How to bulk delete a certain part of all wordpress posts
- When I add metadata, metavalue length is added in to the value in some cases
- WordPress fails to install with “Can’t Select Database” Error (WAMPServer)
- Deleted products from woocommerce are still in the database
- Store GravityForm data in phpmyadmin (mysql)
- Find locations of all featured images of draft posts via SQL
- Update WooCommerce stock status with SQL query if stock value is greater than 0
- SQL query to change custom field in WordPress database
- SQL query to bulk change short code in all posts
- Importing posts content from csv
- duplicate wordpress site on same bdd
- An SQL query to find orphaned image attachments and their meta
- I can not access my local PhpMyAdmin control panel
- Error while submitting form using AJAX and php
- Missing latest posts and options after DB migration via phpMyAdmin
- wp_login.php redirects to old domain
- Check if a database is well installed
- Strings from database are not shown correctly
- Export posts with postmeta without ID?
- cannot log in to the mysql server (wamp and wordpress)
- SQL command to export post_content from wp_posts using phpMyAdmin
- Need SQL query to find&replace image URL
- WordPress database defragmentation
- Cannot login to WordPress admin after update