mac Cant connect to local MySQL server through socket -tmp-mysql.sock (2)

119

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) -

sudo chown -R _mysql:mysql /usr/local/var/mysql

sudo mysql.server start

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) -

ln -s /private/var/mysql/mysql.sock /tmp/mysql.sock

Can't connect to local MySQL server through socket '/tmp/mysql.sock' -

sudo /usr/local/mysql/support-files/mysql.server start 

mac Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) -

// must running multiple server that i why this is happen for linux or mac users

try to login via this command

==>>  mysql -h 127.0.0.1 -P 3306 -uroot -p

-h Host 
-P Port nummber // p should capital

//check you have my sql server up and running 

===>  brew services restart mysql 

/// other solution to debug this 

download mysql work bench here you can connect to server easly

// then under adminstration section > users & privileges you can change the password or 
add adminstrative role to user user


//happy coding :) 

Comments

Submit
0 Comments

More Questions

mysql format datemysql grant all privileges to a user finding duplicate column values in table with sql
mysql format dateorder by sql mysql show all tables
get all table name in sql through phpmysql show tables in database select count of distinct values sql
import database through command linesql server substring rename table sql
selecting name that contain certain word in sqlinstall sqlite3 python select duplicates in sql
ERROR 2002 (HY000): Cant connect to local MySQL server through socket -tmp-mysql.sock (2)alter table add foreign key mysql mysql delete row
how to auto increment in sqlhow to install mysql ubuntu sql where contains
how to create a table structure from another table in mysqlselect nextval from sequence sql truncate table
install sqlite npmpostgresql check total storage GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
how to select one row in mysqlselect row from mysql where date more than 30 days sql view where tables have same column name combine results
python mysql check if database existsdrop table if exists mysql month name extract
SQL SERVER Add Identity Column to existing tableupdate using case in mysql No module named MySQLdb
sql count duplicate rowshow to install postgresql on wsl group_concat limit mysql
sort by sqlquery to list all tables in sql database SELECT User,Host FROM mysql.user;
create a view in sqlitemysql get last insert id SQL UPDATE Statement
mysql show table column full descriptionpostgressql uuid t sql get foreign key