search
尋找貓咪~QQ 地點 桃園市桃園區 Taoyuan , Taoyuan

[FreeBSD]MySQL忘記密碼

今天使用時出現

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

其實是忘記密碼啦XDD

#背景執行mysql安全模式
mysqld_safe -u root --skip-grant-tables  &

#登入mysql(不用密碼)
mysql -u root -p
>use mysql
>UPDATE user SET password=password('這裡輸入你的密碼') where user='root';
>FLUSH PRIVILEGES;
>exit
# 重開
/usr/local/etc/rc.d/mysql-server restart
Categories: FreeBSDMySQL

3 Comments

EQ · 三月 24, 2010 at 5:48 上午

叫我神之手
哈哈哈

johnson · 三月 24, 2010 at 9:28 上午

= =

cant connect to local mysql server through socket tmpmysqlsock -部落格熱搜- cant connect to local mysql server through socket tmpmysqlsock · 八月 28, 2012 at 2:54 上午

[…] 佛祖球球» Blog Archive » [FreeBSD]MySQL無法開啟 […]

Comments are closed.



熱門推薦

本文由 blogjohnsonluorg 提供 原文連結

寵物協尋 相信 終究能找到回家的路
寫了7763篇文章,獲得2次喜歡
留言回覆
回覆
精彩推薦