0

I just installed mariadb on my parrot sec and I tried sudo mysql_secure_installation here is the output :

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
haven't set the root password yet, 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 '/run/mysqld/mysqld.sock' (2)

I also tried mysql -v and it gives the same error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)

and here is the output for systemctl start mariadb :

Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

and here is the output for systemctl status mariadb.service :

● mariadb.service - MariaDB 10.5.8 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sun 2021-02-14 21:14:29 +01; 2min 13s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 212070 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 212071 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 212073 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
    Process: 212121 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
   Main PID: 212121 (code=exited, status=1/FAILURE)
     Status: "MariaDB server is down"
        CPU: 182ms
3
  • Was MySQL on the machine before you installed MariaDB? Or is this the first database engine you've installed on the computer?
    – user1091774
    Feb 14, 2021 at 22:46
  • mariadb was already and I did uninstall it and reinstall it mysql is not supported on parrot as far as i know Feb 14, 2021 at 23:25
  • Could you edit your question and add the result of sudo journalctl n 20 -u mariadb.service, as suggested here? Feb 15, 2021 at 9:43

1 Answer 1

0

I just figure out that this error is because I didn't install a mysql-server on my machine and since parrot sec dosen't support mysql anymore. I did install XAMPP and did run mysql using integrated mysql on XAMPP using the command mysql -h 127.0.0.1 -P 3306 -u root -p but you need to run first xampp and start mysql on it and everything should works

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .