I am using MAMP and Sequel Pro and am unable to connect my database with wordpress for local theme development. In MAMP my lights are green . Inside Sequel Pro, I seem to be able to connect via socket using localhost, root, and my password that I reset in the terminal ( root was not giving me access). Bu then when I try to load in the browser
我正在使用MAMP和Sequel Pro,无法将我的数据库与wordpress连接以进行本地主题开发。在MAMP我的灯是绿色的。在Sequel Pro内部,我似乎能够通过套接字使用localhost,root和我在终端重置的密码连接(root无法授予我访问权限)。然后当我尝试加载浏览器时
http://localhost:8888/wordpress/
with 'wordpress' as my database name in sequel pro, I get "Error establishing a database connection"
用'wordpress'作为sequel pro中的数据库名称,我得到“建立数据库连接时出错”
I changed the MySQL user password in the wp-config file to reflect the password change with no meaningful result:
我更改了wp-config文件中的MySQL用户密码,以反映密码更改,但没有任何有意义的结果:
define('DB_NAME', 'wordpress'); ( as I assigned in sequel pro)
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', 'my password');
/** MySQL hostname */
define('DB_HOST', 'localhost');
I've been searching all night trying all sorts of avenues with no luck.
我一直在寻找各种各样的途径,没有运气。
I was doing fine with MAMP until I recently upgraded to Pro and was prompted to reset the password....since then, no dice despite efforts to reset in the terminal.
在我最近升级到Pro并且提示重置密码之前,我对MAMP做得很好....从那以后,尽管努力在终端重置,但没有骰子。
1 个解决方案
#1
1
This is an old question, but in case anyone runs into this via the googles, the solution is to make sure you're pointing to the correct socket. Sequel Pro by default looks in /tmp/mysql.sock to connect, which is where mysql would be installed if you didn't use MAMP PRO.
这是一个老问题,但是如果有人通过谷歌进入这个问题,解决方法是确保你指向正确的套接字。默认情况下,Sequel Pro会在/tmp/mysql.sock中查找连接,如果您没有使用MAMP PRO,则会安装mysql。
In Sequel Pro, connect using a socket and point the socket to /Applications/MAMP/tmp/mysql/mysql.sock it should all work peachy.
在Sequel Pro中,使用套接字连接并将套接字指向/Applications/MAMP/tmp/mysql/mysql.sock它应该都可以正常工作。
#1
1
This is an old question, but in case anyone runs into this via the googles, the solution is to make sure you're pointing to the correct socket. Sequel Pro by default looks in /tmp/mysql.sock to connect, which is where mysql would be installed if you didn't use MAMP PRO.
这是一个老问题,但是如果有人通过谷歌进入这个问题,解决方法是确保你指向正确的套接字。默认情况下,Sequel Pro会在/tmp/mysql.sock中查找连接,如果您没有使用MAMP PRO,则会安装mysql。
In Sequel Pro, connect using a socket and point the socket to /Applications/MAMP/tmp/mysql/mysql.sock it should all work peachy.
在Sequel Pro中,使用套接字连接并将套接字指向/Applications/MAMP/tmp/mysql/mysql.sock它应该都可以正常工作。