简体   繁体   中英

Can't connect to mysql using localhost

I'm using Mac and latest MySQL. Recently I've updated OS to El Capitan and now realised that 'localhost' as a name does not work anymore, but only 127.0.0.1.

Is there some settings where I can define for mysql that localhost is actually 127.0.0.1?

Here is the message in Drupal (it's because I'm using localhost).

在此处输入图片说明

This settings in Drupal are using in order to connect to mysql database. If I use localhost it does not work, if I use there 127.0.0.1 - it works well.

在此处输入图片说明

我遵循“修复MySQL 5.6的三个选项”下的选项#1,我的错误消失了-Mac OSX上的Mysql 5.6令人头疼

我已经将localhost更新为127.0.0.1,它开始起作用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM