note 81555 added to function.mysqli-connect

From: Date: Mon, 03 Mar 2008 20:17:09 +0000
Subject: note 81555 added to function.mysqli-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-136710@lists.php.net to get a copy of this message
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. ---- Server IP: 208.69.120.35 Probable Submitter: 74.218.200.90 ---- Manual Page -- http://www.php.net/manual/en/function.mysqli-connect.php Edit -- https://master.php.net/note/edit/81555 Del: integrated -- https://master.php.net/note/delete/81555/integrated Del: useless -- https://master.php.net/note/delete/81555/useless Del: bad code -- https://master.php.net/note/delete/81555/bad+code Del: spam -- https://master.php.net/note/delete/81555/spam Del: non-english -- https://master.php.net/note/delete/81555/non-english Del: in docs -- https://master.php.net/note/delete/81555/in+docs Del: other reasons-- https://master.php.net/note/delete/81555 Reject -- https://master.php.net/note/reject/81555 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136710) next »