Page 1 of 1

Have been locked out by MariaDB

PostPosted: 18. June 2019 12:07
by akshat_kapo
A strange thing has started happening after my recent upgrade to XAMPP 3.2.4 with MariaDB 10.3.? on windows 10 (Unable to get the last digits as I cannot login).

When opening localhos/phpmyadmin I get the error
"Host 'localhost' is not allowed to connect to this MariaDB server"

The same error is also displayed when I try to login through XAMPP control panel shell also

Tried to attach 2 screen shots also but failed. Unable to understand how to login.

This has happened before also I had to reinstall xampp to solve this. Luckily I had backups of earlier version and had not started work in the current version.
I do not have the latest backups nor reinstalling is the final solution.

There must be some settings also involved. Please advise so that I may correct them.
Image
Image
Regards
Akshat Kapoor

Re: Have been locked out by MariaDB

PostPosted: 18. June 2019 13:44
by Altrea
The only thing that is involved is the user's permission table of your Mariadb installation. So commonly this problem can occure if you delete or change existing users or import a different database dump of the Mysql root database.

Re: Have been locked out by MariaDB

PostPosted: 18. June 2019 14:05
by akshat_kapo
I had imported databases that I had created. I did not import even a single table / database for the following databases.
Information_schema , mysql , performance_schema , phpmyadmin.

When I stop mariadb from control panel and restart them using

mysqld --skip-grant-tables

I am able to access the tables till I restart my computer.

It seems some setting needs adjustment.

Please advise
Regards
Akshat Kapoor

Re: Have been locked out by MariaDB

PostPosted: 18. June 2019 14:45
by Altrea
Skip-grant-tables does exactly what it says, it ignores the defined users in the Mysql.users table.
So, there must be something wrong with this table or its users, as already said.

Re: Have been locked out by MariaDB

PostPosted: 18. June 2019 19:00
by akshat_kapo
How to repair and restore this table.
Tried restoring from earlier versions of XAMPP but failed as the table crashed again.

Please advise a long lasting solution
Regards
Akshat

Re: Have been locked out by MariaDB

PostPosted: 18. June 2019 19:13
by Nobbie
akshat_kapo wrote:Please advise a long lasting solution


Dont destroy your installation. By far the best advise.

Re: Have been locked out by MariaDB

PostPosted: 18. June 2019 20:19
by Altrea
You have to identify the reason your users table got bad. That is the only way you can be sure to solve that problem properly.

Re: Have been locked out by MariaDB

PostPosted: 19. June 2019 10:55
by akshat_kapo
I have reinstalled mariadb. Will restore from backup.

Backups are created using mysqldump in .sql format for the databases I create and not for all databases.

And restored using mysql.exe

I add 1 user through phpmyadmin

And never touch system databases mysql etc.

Any more precautions that I may take.

Regards
Akshat