"Mysql_connect (): Böyle bir dosya ya da dizin" PHP MySQL bağlantı kurulamıyor

0 Cevap osx

Ben php üzerinden mysql bağlanmak mümkün değilim. Bu PHP mysql_connect() işlevi yürüttükten apache hata günlüğüne [error] [client 127.0.0.1] PHP Warning: mysql_connect(): No such file or directory hata mesajı üretir.

php -m komutunu çalıştırırken uyarı iletileri bulabilirsiniz:

$ php -m | grep mysql  
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/msql.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/msql.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll, 9): image not found in Unknown on line 0
mysql
mysqli
mysqlnd
pdo_mysql

ve

$ mysqladmin -h `hostname` --port=3306 version
/usr/local/mysql/bin/mysqladmin: connect to server at 'heapzero.local' failederror: 'Host '192.168.1.36' is not allowed to connect to this MySQL server'

PHP Sürümü:

$ php --version
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/msql.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/msql.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll, 9): image not found in Unknown on line 0
PHP 5.3.2 (cli) (built: Aug  7 2010 00:04:41) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

MySQL Version:

mysql --version
/usr/local/mysql/bin/mysql  Ver 14.14 Distrib 5.1.50, for apple-darwin10.3.0 (i386) using readline 5.1

Bunu düzeltmek için çalışırken çok zaman geçirdim. Tavsiye edin! Teşekkürler!

0 Cevap