RE: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
On August-17-11 8:04 PM Roger Llopart Pla wrote: That use, or, if it's a development machine, leave it as it is since it does it's work just fine. 2011/8/18 Reindl Harald h.rei...@thelounge.net Am 18.08.2011 01:30, schrieb Stas Malyshev: Hi! well but using root as default is a little bit crazy using user test with empty password is acceptable but root It's not _that_ root. For mysql, it's just a default user name. Most people would run it on development machines with mysql configured not to answer to network, so it's not of a problem it IS THAT root of mysql please do not believe i think it has anything to do with system-root i am doing this job now since ten years :-) using a build/test-server with mysql-driven pure-ftpd and phpmyadmin while having horde-webmail also on the test-machine and you are f**ed with a mysql-root without password the only sense for the default-root without pwd in mysql is to enter mysql -u root and set your pwd directly after install It strikes me that the out-of-the-box test only works on a fresh clean install of MySQL. The install docs for MySQL strongly recommend changing that immediately after the install - which I think most people do - so I doubt very much those are the credentials for the vast majority of MySQL installs in the world. I'm wondering if adding a prompt for the mysql username and password, with the defaults set as is, would be possible, and if so, if someone were to offer a patch why it shouldn't be considered. IMHO, if the defaults were used and the tests ran successfully, I'd be tempted to display a console message along the lines of your myself default root credentials are wide open, are you being silly? Best Regards, Mike Robinson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
On Thu, 2011-08-18 at 11:55 -0400, Mike Robinson wrote: I'm wondering if adding a prompt for the mysql username and password, with the defaults set as is, would be possible, and if so, if someone were to offer a patch why it shouldn't be considered. since you would need quite a few prompts. It's not about MySQL only what about other databases? We also have other tests which are configurable in one way or the other. But you can easily set the mentioned environment variables and be done. IMHO, if the defaults were used and the tests ran successfully, I'd be tempted to display a console message along the lines of your myself default root credentials are wide open, are you being silly? Well as Stas said - on a developer machine where MySQL is not lsitening to the outside and doesn't store confidential data there is no harm in having a mysql root without password. Anybody who can exploit it can already execute arbitrary code which is way more critical. johannes (who doesn't get the excitement in this thread) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
Am 18.08.2011 00:46, schrieb Reindl Harald: Wouldn't it be a good idea to specify here a user/pwd/database for build-systems without force them open root without password? SKIP mysql_get_host_info() [ext/mysql/tests/mysql_get_host_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) Please, configure the tests to use whatever database user you want them to use prior to running. If nothing else is configured, the tests need to make a guess on the on the DB credentials. The guess is user=root, password= as such a DB account is available when doing, for example, a source installation of MySQL. Have a look at http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc?revision=296885view=markup . It tries to check the environment for variable to allow for easy configuration but ultimately has some defaults in it. This is a common pattern, for example, check http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/oci8/tests/details.inc?revision=312024view=markup . If no configuration done through environment settings, OCI8 tests default to DB user system, password oracle - whatever user that is. grep -R getenv ext/*/tests/*.inc - ext/ldap - ext/mysqli - ext/mysql - ext/oci8 - ext/pdo_mysql - ext/pdo_pgsql - ext/pdo - ext/sybase grep -R getenv ext/*/tests/*.phpt - ext/curl - ext/pdo_pretty_much_all_of_them A potential pitfall that affects all test writers trying to allow configuration via environment settings is the - certainly sensible - variables_order setting found in php.ini-development and php.ini-production. php.ini-development:variables_order = GPCS php.ini-production:variables_order = GPCS If any of the two is used as a configuration file for running tests through run-tests.php, run-tests.phpt will not be able provide tests with all environment variables, http://lxr.php.net/xref/PHP_5_3/run-tests.php#140 . run-tests.php relies on $_ENV and $_ENV is empty. To make a long story short: tests may require manual configuration prior to running. Ulf -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
Wouldn't it be a good idea to specify here a user/pwd/database for build-systems without force them open root without password? SKIP mysql_get_host_info() [ext/mysql/tests/mysql_get_host_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_get_proto_info() [ext/mysql/tests/mysql_get_proto_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_get_server_info() [ext/mysql/tests/mysql_get_server_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_info() [ext/mysql/tests/mysql_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_insert_id() [ext/mysql/tests/mysql_insert_id.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_dbs() [ext/mysql/tests/mysql_list_dbs.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_fields() [ext/mysql/tests/mysql_list_fields.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_processes() [ext/mysql/tests/mysql_list_processes.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_tables() [ext/mysql/tests/mysql_list_tables.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) FAIL mysql_[p]connect() - max_links/max_persistent [ext/mysql/tests/mysql_max_links.phpt] SKIP mysql_[p]connect() - max_links/max_persistent [ext/mysql/tests/mysql_max_persistent.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysqlnd.net_read_timeout default_socket_timeout [ext/mysql/tests/mysql_mysqlnd_read_timeout_long.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user signature.asc Description: OpenPGP digital signature
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
On 18/08/2011, at 10:46 AM, Reindl Harald wrote: Wouldn't it be a good idea to specify here a user/pwd/database for build-systems without force them open root without password? SKIP mysql_get_host_info() [ext/mysql/tests/mysql_get_host_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_get_proto_info() [ext/mysql/tests/mysql_get_proto_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_get_server_info() [ext/mysql/tests/mysql_get_server_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_info() [ext/mysql/tests/mysql_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_insert_id() [ext/mysql/tests/mysql_insert_id.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_dbs() [ext/mysql/tests/mysql_list_dbs.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_fields() [ext/mysql/tests/mysql_list_fields.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_processes() [ext/mysql/tests/mysql_list_processes.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_tables() [ext/mysql/tests/mysql_list_tables.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) FAIL mysql_[p]connect() - max_links/max_persistent [ext/mysql/tests/mysql_max_links.phpt] SKIP mysql_[p]connect() - max_links/max_persistent [ext/mysql/tests/mysql_max_persistent.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysqlnd.net_read_timeout default_socket_timeout [ext/mysql/tests/mysql_mysqlnd_read_timeout_long.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user From ext/mysql/tests/connect.inc: /* Default values are localhost, root, database test and empty password. Change the MYSQL_TEST_* environment values if you want to use another configuration. */ --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
On Thu, Aug 18, 2011 at 00:46, Reindl Harald h.rei...@thelounge.net wrote: Wouldn't it be a good idea to specify here a user/pwd/database for build-systems without force them open root without password? I guess you've never looked at the tests, fair enough - there should probably be some to get accurate results do this README file MYSQL_TEST_HOST MYSQL_TEST_PORT MYSQL_TEST_USER MYSQL_TEST_PASSWD MYSQL_TEST_DB . among several other environment variables can be set to test different mysql aspects.. :) -Hannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
Am 18.08.2011 00:52, schrieb Simon J Welsh: On 18/08/2011, at 10:46 AM, Reindl Harald wrote: Wouldn't it be a good idea to specify here a user/pwd/database for build-systems without force them open root without password? SKIP mysql_get_host_info() [ext/mysql/tests/mysql_get_host_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_get_proto_info() [ext/mysql/tests/mysql_get_proto_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_get_server_info() [ext/mysql/tests/mysql_get_server_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_info() [ext/mysql/tests/mysql_info.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_insert_id() [ext/mysql/tests/mysql_insert_id.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_dbs() [ext/mysql/tests/mysql_list_dbs.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_fields() [ext/mysql/tests/mysql_list_fields.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_processes() [ext/mysql/tests/mysql_list_processes.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysql_list_tables() [ext/mysql/tests/mysql_list_tables.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) FAIL mysql_[p]connect() - max_links/max_persistent [ext/mysql/tests/mysql_max_links.phpt] SKIP mysql_[p]connect() - max_links/max_persistent [ext/mysql/tests/mysql_max_persistent.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user 'root'@'localhost' (using password: NO) SKIP mysqlnd.net_read_timeout default_socket_timeout [ext/mysql/tests/mysql_mysqlnd_read_timeout_long.phpt] reason: Can't connect to MySQL Server - [1045] Access denied for user From ext/mysql/tests/connect.inc: /* Default values are localhost, root, database test and empty password. Change the MYSQL_TEST_* environment values if you want to use another configuration. */ well but using root as default is a little bit crazy using user test with empty password is acceptable but root signature.asc Description: OpenPGP digital signature
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
Am 18.08.2011 00:55, schrieb Hannes Magnusson: On Thu, Aug 18, 2011 at 00:46, Reindl Harald h.rei...@thelounge.net wrote: Wouldn't it be a good idea to specify here a user/pwd/database for build-systems without force them open root without password? I guess you've never looked at the tests, fair enough - there should probably be some to get accurate results do this README file MYSQL_TEST_HOST MYSQL_TEST_PORT MYSQL_TEST_USER MYSQL_TEST_PASSWD MYSQL_TEST_DB . among several other environment variables can be set to test different mysql aspects.. :) of course - i make a rebuild of the fedora-pakcages for as example 5.3.7 this time and they are unpacking source, apply patches, fire up the tests and remove the whole build-directory at the end to start every time with a fresh tree signature.asc Description: OpenPGP digital signature
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
On Thu, 2011-08-18 at 00:56 +0200, Reindl Harald wrote: well but using root as default is a little bit crazy using user test with empty password is acceptable but root root without password is the user created by default by mysql's mysql_install_db. So this can be used on quite a few machines. If you want to use another user do it but for the vast majority of people this makes the tests to run out of the box. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
Hi! well but using root as default is a little bit crazy using user test with empty password is acceptable but root It's not _that_ root. For mysql, it's just a default user name. Most people would run it on development machines with mysql configured not to answer to network, so it's not much of a problem. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
Am 18.08.2011 01:30, schrieb Stas Malyshev: Hi! well but using root as default is a little bit crazy using user test with empty password is acceptable but root It's not _that_ root. For mysql, it's just a default user name. Most people would run it on development machines with mysql configured not to answer to network, so it's not much of a problem it IS THAT root of mysql please do not believe i think it has anything to do with system-root i am doing this job now since ten years :-) using a build/test-server with mysql-driven pure-ftpd and phpmyadmin while having horde-webmail also on the test-machine and you are f**ed with a mysql-root without password the only sense for the default-root without pwd in mysql is to enter mysql -u root and set your pwd directly after install signature.asc Description: OpenPGP digital signature
Re: [PHP-DEV] Autotests: Access denied for user 'root'@'localhost' (using password: NO)
That use, or, if it's a development machine, leave it as it is since it does it's work just fine. 2011/8/18 Reindl Harald h.rei...@thelounge.net Am 18.08.2011 01:30, schrieb Stas Malyshev: Hi! well but using root as default is a little bit crazy using user test with empty password is acceptable but root It's not _that_ root. For mysql, it's just a default user name. Most people would run it on development machines with mysql configured not to answer to network, so it's not much of a problem it IS THAT root of mysql please do not believe i think it has anything to do with system-root i am doing this job now since ten years :-) using a build/test-server with mysql-driven pure-ftpd and phpmyadmin while having horde-webmail also on the test-machine and you are f**ed with a mysql-root without password the only sense for the default-root without pwd in mysql is to enter mysql -u root and set your pwd directly after install