Mysql Error Mysql.sock
have one accepted answer. Are you sure you want to replace the current answer with this one? Yes, I'm sure. Changed your mind? You previously marked this answer as accepted. Are you sure you want to unaccept it? Yes, I'm sure. Sign Up Log In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All Results By: decaobr Subscribe Subscribed Share 1 MySQL -Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) September 30, 2014 85.8k views I currenty have a LAMP, running on Ubuntu 14.04, yesterday everything was fine, but today my MYSQL is not working. When i try to connect via mysql -u root -p I get the error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) the Mysql.err file is completely empty, and have absolute no ideia about what to do. 2 comments 0 empty September 30, 2014 Is it running? 3 sreejithkb September 18, 2015 I think you didn't started your database server, start it using #services mysql start or #/etc/init.d/mysql start If you are getting a failure message while starting, check the log file (/var/log/syslog), if you found socket connection error message there, then check for correct socket file location #find / -type s, if you found a mysqld.sock file under /var/run/mysqld/ directory, check whether any instances of mysqld running or not #netstat -anpt | grep 3306 or #ps aux | grep mysqld if you found any running process stop it (#kill -9 pid) and remove the socket file. Then try to restart it and if mysql not creating socket file then try start it like #/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock Also check your my.cnf file (/etc/mysql/my.cnf) and comment the bind-address field, and if you found any skip-network field comment it. regards, sreejith kb Log In to Comment Leave a Comment Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below. Log In to Comment 6 Answers 0 decaobr September 30, 2014 I tried to reboot my server, and now its completely off. Reply Log In to Comment 0 decaobr September 30, 2014 Server is back online, Mysql still completely dead. 0 decaobr September 30, 2014 Problem solved, basically i had to purge and reinstall mysql. Using this http://stackoverflow.com/questions/22909060/mysql-job-failed-to-start Reply Log In to
have one accepted answer. Are you sure you want to replace the current answer with this one? Yes, I'm sure. Changed your mind? You previously marked this answer as accepted. Are you sure you want to unaccept it? Yes, I'm sure. Sign Up Log In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All Results By: https://www.digitalocean.com/community/questions/mysql-can-t-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysqld-sock-2 decaobr Subscribe Subscribed Share 1 MySQL -Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) September 30, 2014 85.8k views I currenty have a LAMP, running on Ubuntu 14.04, yesterday everything was fine, but today my MYSQL is not working. When i try to connect via mysql -u root -p I get the https://www.digitalocean.com/community/questions/mysql-can-t-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysqld-sock-2 error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) the Mysql.err file is completely empty, and have absolute no ideia about what to do. 2 comments 0 empty September 30, 2014 Is it running? 3 sreejithkb September 18, 2015 I think you didn't started your database server, start it using #services mysql start or #/etc/init.d/mysql start If you are getting a failure message while starting, check the log file (/var/log/syslog), if you found socket connection error message there, then check for correct socket file location #find / -type s, if you found a mysqld.sock file under /var/run/mysqld/ directory, check whether any instances of mysqld running or not #netstat -anpt | grep 3306 or #ps aux | grep mysqld if you found any running process stop it (#kill -9 pid) and remove the socket file. Then try to restart it and if mysql not creating socket file then try start it like #/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysql
Connectors More MySQL.com Downloads Developer Zone Section Menu: Documentation Home MySQL 5.7 Reference Manual Preface and Legal Notices General Information Installing and Upgrading MySQL Using MySQL as a Document Store Tutorial MySQL Programs MySQL http://dev.mysql.com/doc/en/can-not-connect-to-server.html Server Administration Security Backup and Recovery Optimization Language Structure Globalization Data Types Functions and Operators SQL Statement Syntax The InnoDB Storage Engine Alternative Storage Engines High Availability and Scalability Replication MySQL Cluster NDB 7.5 Partitioning Stored Programs and Views INFORMATION_SCHEMA Tables MySQL Performance Schema MySQL sys Schema Connectors and APIs Extending MySQL MySQL Enterprise Edition MySQL Workbench MySQL 5.7 Frequently Asked Questions Errors, Error Codes, mysql error and Common Problems Sources of Error Information Types of Error Values Server Error Codes and Messages Client Error Codes and Messages Problems and Common Errors How to Determine What Is Causing a Problem Common Errors When Using MySQL Programs Access denied Can't connect to [local] MySQL server Lost connection to MySQL server Client does not support authentication protocol Password Fails When Entered Interactively Host 'host_name' mysql error mysql.sock is blocked Too many connections Out of memory MySQL server has gone away Packet Too Large Communication Errors and Aborted Connections The table is full Can't create/write to file Commands out of sync Ignoring user Table 'tbl_name' doesn't exist Can't initialize character set File Not Found and Similar Errors Table-Corruption Issues Administration-Related Issues Problems with File Permissions How to Reset the Root Password What to Do If MySQL Keeps Crashing How MySQL Handles a Full Disk Where MySQL Stores Temporary Files How to Protect or Change the MySQL Unix Socket File Time Zone Problems Query-Related Issues Case Sensitivity in String Searches Problems Using DATE Columns Problems with NULL Values Problems with Column Aliases Rollback Failure for Nontransactional Tables Deleting Rows from Related Tables Solving Problems with No Matching Rows Problems with Floating-Point Values Optimizer-Related Issues Table Definition-Related Issues Problems with ALTER TABLE TEMPORARY Table Problems Known Issues in MySQL Restrictions and Limits Indexes MySQL Glossary Related Documentation MySQL 5.7 Release Notes Download this Manual PDF (US Ltr) - 35.6Mb PDF (A4) - 35.6Mb PDF (RPM) - 34.6Mb EPUB - 8.7Mb HTML Download (TGZ) - 8.4Mb HTML Download (Zip) - 8.5Mb HTML Download (RPM