Skip to content
Snippets Groups Projects
Commit 6672cb71 authored by Will Spooner's avatar Will Spooner
Browse files

Added quotes to mysql -p param to allow passwords that contain non-shell-safe characters

parent fb3686b7
No related branches found
No related tags found
No related merge requests found
......@@ -1601,18 +1601,18 @@ sub create {
if ( !-e catfile( $sql_dir, 'sql', 'table.sql' ) ) {
croak( "Cannot open " . catfile( $sql_dir, 'sql', 'table.sql' ) );
}
my $cmd = "mysql -u $user -p$pass -P $port -h $host $dbname < "
my $cmd = "mysql -u $user -p'$pass' -P $port -h $host $dbname < "
. catfile( $sql_dir, 'sql', 'table.sql' );
system($cmd);
system($cmd) == 0 or die( "Cannot run the following (exit $?):\n$cmd\n" );
print "Populating metadata in $dbname from ".$sql_dir."sql/populate_metadata.sql\n";
if ( !-e catfile( $sql_dir, 'sql', 'populate_metadata.sql' ) ) {
croak( "Cannot open "
. catfile( $sql_dir, 'sql', 'populate_metadata.sql' ) );
}
$cmd = "mysql -u $user -p$pass -P $port -h $host $dbname < "
$cmd = "mysql -u $user -p'$pass' -P $port -h $host $dbname < "
. catfile( $sql_dir, 'sql', 'populate_metadata.sql' );
system($cmd);
system($cmd) == 0 or die( "Cannot run the following (exit $?):\n$cmd\n" );
}
sub get_label_to_accession{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment