Home  >  Article  >  php教程  >  php连接MySQL数据库的一些问题

php连接MySQL数据库的一些问题

WBOY
WBOYOriginal
2016-06-13 10:44:001179browse

  1,在系统的 system32(C:\windows\system32)目录下缺少libmysql.dll文件,解决方法是找到php目录下的libmysql.dll,并将libmysql.dll复制到C:\ windows\system32目录中,然后重新启动Web服务。
    2, 在C:\windows目录下的php.ini文件中,没有将“;extension=php_mysql.dll”中的前面一个“;”去掉,所以不能使用相应功能,解决方法是打开php.ini文件找到
;extension=php_mysql.dll
改成
extension=php_mysql.dll   //去掉前面的;使之生效
    3, Mysql目录没有读取权限,正确的目录权限如下:
administrator   完全控制
system          完全控制
users           读取和运行+列出文件夹目录+读取
其他的用户权限全部删除,然后重启MYsql服务和Web服务
(注:以上设置无安全设置;建议修改后重启一下服务器)
重要,还要检查php.ini文件的权限,检查复制到system32里面的php文件的权限,检查php安装目录文件夹的权限.至少要有users默认权限.temp文件夹至少要有users组修改级别权限.
From www.clxw.com

第三个没遇到,其他两个都是有用的。。

作者“浮在记忆中的美好”
 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn