Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7657

mysql_secure_installation does not work with non-default socket file location

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0.17, 10.0
    • Fix Version/s: 10.1
    • Component/s: Admin statements
    • Environment:
      Debian Linux 7.8 x86_64

      Description

      mysql_secure_installation fails when server is compiled/installed with non-default socket location. It also does not accept any flags pointing it in the right direction.
      See: http://bugs.mysql.com/bug.php?id=46842

      Example:

      dbuser@dbhost:~$ cat .my.cnf 
      [client]
      user = root
      #password = <fill me in>
      host = 127.0.0.1
      port = 3323
      
      dbuser@dbhost:~$ /home/dbuser/mariadb-10.0.17/bin/mysql_secure_installation 
      
      NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
            SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
      
      In order to log into MariaDB to secure it, we'll need the current
      password for the root user.  If you've just installed MariaDB, and
      you haven't set the root password yet, the password will be blank,
      so you should just press enter here.
      
      Enter current password for root (enter for none): 
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
      
      dbuser@dbhost:~$ /home/dbuser/mariadb-10.0.17/bin/mysql_secure_installation --defaults-extra-file=~/.my.cnf
      
      NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
            SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
      
      In order to} log into MariaDB to secure it, we'll need the current
      password for the root user.  If you've just installed MariaDB, and
      you haven't set the root password yet, the password will be blank,
      so you should just press enter here.
      
      Enter current password for root (enter for none): 
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
      
      dbuser@dbhost:~$ /home/dbuser/mariadb-10.0.17/bin/mysql_secure_installation --socket=~/mariadb-10.0.17/var/mysql.sock
      
      NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
            SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
      
      In order to log into MariaDB to secure it, we'll need the current
      password for the root user.  If you've just installed MariaDB, and
      you haven't set the root password yet, the password will be blank,
      so you should just press enter here.
      
      Enter current password for root (enter for none): 
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
      
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              Apparently it was fixed in 5.7.

              Show
              elenst Elena Stepanova added a comment - Apparently it was fixed in 5.7.

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  jnicol Jonathan Nicol
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: