OSDN Git Service

run_mysql_command: use --no-defaults instead of --defaults-file
authorscribu <mail@scribu.net>
Thu, 30 May 2013 14:26:45 +0000 (17:26 +0300)
committerscribu <mail@scribu.net>
Sun, 2 Jun 2013 19:15:42 +0000 (22:15 +0300)
php/utils.php

index 5c4da77..7d3fe7a 100644 (file)
@@ -404,7 +404,7 @@ function run_mysql_query( $query, $args ) {
 function run_mysql_command( $cmd, $arg_str, $pass ) {
        $old_val = getenv( 'MYSQL_PWD' );
 
-       $final_cmd = "$cmd --defaults-file=/dev/null $arg_str";
+       $final_cmd = "$cmd --no-defaults $arg_str";
 
        putenv( 'MYSQL_PWD=' . $pass );
        $r = proc_close( proc_open( $final_cmd, array( STDIN, STDOUT, STDERR ), $pipes ) );