在XAMPP for Windows中找不到套接字配置的位置 [英] Can't find where the socket configuration is in XAMPP for Windows

查看:97
本文介绍了在XAMPP for Windows中找不到套接字配置的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在PHP项目中使用Netbeans 7.0.1.

I'm using Netbeans 7.0.1 in a PHP project.

我已经使用xampp.org中的安装程序在Windows 7 64位中安装了XAMPP 1.7. 自从我也使用IIS以来,我已经将Apache的端口从80和443更改为81和442. 我没有安装任何服务,而是使用控制面板"启动/停止mysql,apache等.

I've installed XAMPP 1.7 in Windows 7 64 bits with the installer we can find in xampp.org. I've changed the port of apache from 80 and 443 to 81 and 442 since I'm using IIS as well. I didn't installed anything as a service, I'm using the Control Panel to start/stop mysql, apache, etc.

我的问题是我的单元测试失败了,而上下文是我正在与两个在Mac上工作的人一起开发项目.

My problem is that my unit test are failing, and the context is that I'm developing the project with two guys who are working on Macs.

他们有一个带有这样一行的配置文件:

They have a configuration file with a line like this:

database_socket = /var/run/mysqld/mysqld.sock

我的单元测试失败了,他们告诉我,其中一个遇到了同样的问题,将其更改为正确的方法可以解决他的问题.

My unit test are failing and they told me that one of them had the very same issue and changing that path to the correct one fixed his problem.

现在,Windows XAMPP中的该文件在哪里?我在整个硬盘中进行了搜索(我知道mysql必须正在运行才能使该文件存在,是的,它正在运行:)),但我找不到它.

Now, Where is that file in the Windows XAMPP? I made a search in the whole hard drive (I know mysql must be running for that file to exists, and yes, it is running :)) and I couldn't find it.

此人正在使用一个名为Parameters.ini的文件,其中指定了套接字路径,然后调用$ container = $ kernel-> getContainer();.并且数据库似乎已实例化.

This guy is using a file named Parameters.ini where the socket path is specified then he call $container = $kernel->getContainer(); and the database seems to be instantiated.

我试图更改该文件(parameters.ini),该文件现在具有以下内容:

I tried to changed that file (parameters.ini) which has right now this:

database_host = localhost
database_socket = /var/run/mysqld/mysqld.sock
database_user = user
database_password = pass
database_schema = lad

但是如果我删除database_socket,它会抱怨.

but if I remove database_socket it complains.

我尝试按照此处的说明进行操作: http://www.devside.net/guides/Windows/MySQL 设置(用xampp更改www)

I tried to follow the instructions here: http://www.devside.net/guides/windows/mysql Setup (changing www with xampp)

解压为C:\ www \ mysql-5.1.56-win32

Unpack as C:\www\mysql-5.1.56-win32

将目录C:\ www \ mysql-5.1.56-win32重命名为C:\ www \ mysql

Rename directory C:\www\mysql-5.1.56-win32 to C:\www\mysql

将MySQL配置文件C:\ www \ mysql \ my-medium.ini(或您选择的其他其中一个my-*.ini文件)复制到您的%SYSTEMROOT%目录中

Copy MySQL configuration file C:\www\mysql\my-medium.ini (or your choice of one of the other included my-*.ini files) to your %SYSTEMROOT% directory

将文件%SYSTEMROOT%\ my-medium.ini(或通过my-*.ini文件复制)重命名为my.ini

Rename file %SYSTEMROOT%\my-medium.ini (or the copied over my-*.ini file) to my.ini

Edit %SYSTEMROOT%\my.ini

在"[客户端]"和"[mysqld]"部分下,编辑...

Under Sections "[client]" and "[mysqld]", edit...

socket = C:/www/tmp/mysql.sock

在"[mysqld]"部分下,插入...

Under Section "[mysqld]", insert...

basedir = C:/www/mysql/
datadir = C:/www/mysql/data/

重新启动mysql,但是什么也没发生.

Restarted mysql, but nothing happened.

推荐答案

解决方案是将套接字行放置为空值.

The solution is to put the socket line with an empty value.

socket = ""

这篇关于在XAMPP for Windows中找不到套接字配置的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆