0

I have followed the link for installation .

https://downloads.mariadb.org/mariadb/repositories/#mirror=23Media&distro=Debian&distro_release=jessie--jessie&version=10.2

After adding Repo.list and keys , it started installing .But ended up with the following error message

Unable to set password for the MariaDB "root" user An error occurred while setting the password for the MariaDB administrative user. This may have happened because the account already has a password, or because of a communication problem with the MariaDB server. You should check the account's password after the package installation.

But Mariadb-10.0 , 10.1 distributions are installing properly and working fine .

gotam
  • 193
  • 2
  • 11

2 Answers2

2

The solution given by this link works for me https://jira.mariadb.org/browse/MDEV-14416

It was a bug with ext3 file system. They fixed it already . The patch will be released in version 10.2.11.But for this above situation please do the following steps [I am doing fresh installation. so no databases inside].

  1. open my.cnf file , find innodb_flush_method = O_DIRECT comment it and save .
  2. rm -rf /var/lib/mysql/*
  3. mysql_install_db
  4. systemctl start mariadb.service
  5. mysql -u root [without password]

After entering console , you can set password using the following command

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('pass');

gotam
  • 193
  • 2
  • 11
0

Try to access MariaDb in CLI without a password.

mysql -u root

If you can do that, you can then just set a password for a user.

  • its not installed .so obviously i cant do that – gotam Nov 16 '17 at 10:02
  • Check this link: [link](https://askubuntu.com/questions/253023/unable-to-set-password-for-the-mysql-root-user) – Mladen Ignjatovic Nov 16 '17 at 10:14
  • Even better: [link](https://askubuntu.com/questions/806738/mariadb-10-1-and-ubuntu-16-04-unable-to-set-password-for-the-mariadb-root-use) – Mladen Ignjatovic Nov 16 '17 at 10:16
  • for you information , it doesnot contain any pre installed databases. Its fresh machine .i tried reloading os and installed mariadb . stilll the same .so your answer won't help me . – gotam Nov 16 '17 at 12:30
  • did you run `apt-get -f install` after installation? Maybe is a package problem. This command repairs all dependencies. Or you can consider upgrading to Debian 9 with just a couple commands. Debian 9 have MariaDb by default in repository. – Mladen Ignjatovic Nov 16 '17 at 12:52