--- a/scripts/mysql_secure_installation.pl.in	2014-06-02 09:17:44.000000000 -0700
+++ b/scripts/mysql_secure_installation.pl.in	2014-06-02 09:16:56.000000000 -0700
@@ -85,7 +85,7 @@
   our $SAVEERR;   # Suppress Perl warning message
   open SAVEERR, ">& STDERR";
   close STDERR;
-  for my $m (File::Spec->catfile('bin', 'mysql'), 'mysql') {
+  for my $m (File::Spec->catfile('@BINDIR@', 'mysql'), 'mysql') {
     # mysql --version should always work
     qx($m --no-defaults --version);
     next unless $? == 0;
