note 81554 added to function.mysql-connect

From: Date: Mon, 03 Mar 2008 20:15:48 +0000
Subject: note 81554 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-136709@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.mysql-connect.php Edit -- https://master.php.net/note/edit/81554 Del: integrated -- https://master.php.net/note/delete/81554/integrated Del: useless -- https://master.php.net/note/delete/81554/useless Del: bad code -- https://master.php.net/note/delete/81554/bad+code Del: spam -- https://master.php.net/note/delete/81554/spam Del: non-english -- https://master.php.net/note/delete/81554/non-english Del: in docs -- https://master.php.net/note/delete/81554/in+docs Del: other reasons-- https://master.php.net/note/delete/81554 Reject -- https://master.php.net/note/reject/81554 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136709) next »