MariaDB: reset password

Forum Forums General Software MariaDB: reset password

  • This topic has 4 replies, 3 voices, and was last updated Sep 29-8:19 am by iznit.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #89843
    Member
    zsalya

      I need to reset a MariaDB root password.
      I found https://sysadminote.com/how-to-reset-mysql-mariadb-database-root-password/ but fall at the first hurdle since antix does not have systemdtl
      I also found https://mariadb.com/kb/en/sysvinit/#interacting-with-the-mariadb-server-process but
      service mysql stop gives “mysql unrecognised service” and
      service mariadb stop gives “Stopping MariaDB database server: mariadbd failed! ”
      In case it had stopped, I tried sudo mysqld_safe –skip-grant-tables –skip-networking &
      But that gave “mysqld_safe A mysqld process already exists”

      How do I stop MariaDB running on Antix?
      Are the instructions on the first link then enough to reset the password; if not, what do I need to do?

      #89844
      Member
      iznit
        Helpful
        Up
        0
        ::

        Probably “sudo service mysqld stop”. If that fails, use “sudo service [dash dash] –status-all” to verify the actual name of the server process.

        2 dash characters, what shares a keyboard key with the underscore character, at the front of status-all. The forum is displaying differently from what I typed here.

        • This reply was modified 7 months, 1 week ago by iznit.
        #89854
        Member
        Robin
          Helpful
          Up
          0
          ::

          @iznit You can use Zero-widht blank in your text to make sure the two dashes are displayed properly:
          The character code for this is
          &​#8203;
          (Ampersand Sharp 8203 Semicolon)
          So it will look like

          sudo service -​-​status-all

          if you enter this code in between the two dashes. Still this properly displayed string doesn’t allow copy and paste to console, it has to be retyped by user, otherwise it will fail. At least this way you don’t need any additional explication.

          Windows is like a submarine. Open a window and serious problems will start.

          #89871
          Member
          zsalya
            Helpful
            Up
            0
            ::

            sudo service mysqld stop gives: mysqld: unrecognized service

            sudo service --status-all gives:
            [ + ] acpid
            [ ? ] alsa-utils
            [ – ] anacron
            [ – ] apache-htcacheclean
            [ + ] apache2
            [ – ] bootlogs
            [ – ] bootmisc.sh
            [ – ] brightness
            [ – ] checkfs.sh
            [ – ] checkroot-bootclean.sh
            [ – ] checkroot.sh
            [ + ] connman
            [ – ] console-setup.sh
            [ + ] cron
            [ ? ] cryptdisks
            [ ? ] cryptdisks-early
            [ + ] dbus
            [ + ] elogind
            [ + ] gpm
            [ + ] haveged
            [ – ] hostname.sh
            [ ? ] hwclock.sh
            [ – ] keyboard-setup.sh
            [ – ] killprocs
            [ ? ] kmod
            [ – ] live-grubsave
            [ – ] lm-sensors
            [ + ] mariadb
            [ ? ] mount-configfs
            [ – ] mountall-bootclean.sh
            [ – ] mountall.sh
            [ – ] mountdevsubfs.sh
            [ – ] mountkernfs.sh
            [ – ] mountnfs-bootclean.sh
            [ – ] mountnfs.sh
            [ ? ] networking
            [ + ] nfs-common
            [ + ] ntp
            [ – ] oobe
            [ – ] procps
            [ – ] rc.local
            [ + ] resolvconf
            [ – ] rmnologin
            [ + ] rpcbind
            [ – ] rsync
            [ + ] rsyslog
            [ – ] sendsigs
            [ + ] slimski
            [ + ] smartmontools
            [ – ] sudo
            [ + ] tlp
            [ + ] udev
            [ – ] ufw
            [ – ] umountfs
            [ ? ] umountnfs-alternative.sh
            [ – ] umountnfs.sh
            [ – ] umountroot
            [ – ] urandom
            [ – ] x11-common

            The only one that looks relevant is mariadb, but per original post, sudo service mariadb stop gives
            Stopping MariaDB database server: mariadbd failed!

            sudo service mariadb status gives
            /usr/bin/mysqladmin: connect to server at ‘localhost’ failed
            error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

            I am thinking I will have to reinstall mariadb ?

            #89915
            Member
            iznit
              Helpful
              Up
              0
              ::

              Okay, original post did not indicate use of sudo, so I suggested that [[[sudo]]]. If the command sudo service mysql restart does not work, yes I would reinstall and try the command again after reinstall.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.