note 81555 deleted from function.mysqli-connect by nlopess

From: Date: Mon, 03 Mar 2008 22:06:52 +0000
Subject: note 81555 deleted from function.mysqli-connect by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-136712@lists.php.net to get a copy of this message
Note Submitter: aeolianmeson at blitzeclipse dot com ---- Recently, I saw an obscure problem where I could connect to MySQL from the PHP via Apache and MySQL via the MySQL console, and could not connect via the PHP-CLI. This was in Windows (XP). I usually use MySQLi extension, but also tried MySQL, and both refused to work. I restarted the service multiple times, and the PHP-CLI still would not connect. This eventually cleared up. I made sure to stop the service. Then, I downloaded a zipped binary-package from dev.mysql.com and started the server a few times from the commandline (mysqld/mysqld-nt, where mysqld-nt is tuned specifically for Windows) and stopped it ("mysqladmin shutdown"). I was then able to successfully connect from the PHP-CLI ("php -r "mysql_connect('localhost', 'root', ''); "). Making sure it was stopped, I started the regular server from the commandline, and that was then successful. I then stopped it and started it via the Services panel, and everything still worked. I'm assuming that when the service was restarted initially, there was a component that had died and refused to be shutdown even though the service appeared to be stopped, but shutting it down via mysqladmin killed everything entirely.

« previous php.notes (#136712) next »