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

mysql_secure_installation does not work with non-default socket file location

    XMLWordPrintable

Details

    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)
       

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.