且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用户'SYSTEM'@'localhost'的访问被拒绝(PHP 5.2.17 + mySQL 5.5.8 + Windows 7)

更新时间:2023-02-20 09:22:19

如果php.ini中的 on 中的sql.safe_mode(不是PHP安全模式),则PHP始终使用脚本连接到SQL Server的所有者,而不是mysql_connect()中指定的用户.

If the sql.safe_mode (NOT the PHP safe mode) in on in the php.ini, PHP is always using the script owner to connect to the SQL server and not the user specified in mysql_connect().

在配置过程中我混用了属性safe_modesql.safe_mode,这花了我6个小时!

I mixed up the property safe_mode and sql.safe_mode during the configuration and it cost me 6 hours!

在此处找到了答案: http://www.php. net/manual/de/ref.mysql.php#72632