0

We have a website running on an custom Ubuntu server managed and hosted by the client himself, since last two days the website database is getting hacked and someone deletes all the db tables from the database.

Upon checking the Db connection I come to know that database is getting connected with any username and password, is there any configuration issue in mysql? I am not able to find anything on google or stackoverflow.

Any help would be appreciated. TIA.

EDIT: I checked mysql users table and there are three users in the table as listed below,

  1. root
  2. mysql.sys
  3. mysql.session
3
  • database is getting connected with any username and password Really SHOW PROCESSLIST shows that all connections have different usernames and hosts? – Akina Jan 23 '20 at 6:36
  • 1
    Does this answer your question? MySQL Allows ODBC With Any Username – Barmar Jan 23 '20 at 6:39
  • @Akina, yes it was allowing login with any username and password.. as per suggested by @Barmar, it was due to option --skip-grant-tables.. after turning it off it works normally.. To turn off I ran FLUSH PRIVILEGES; command.. thanks :) – Nishant Solanki Jan 23 '20 at 6:54
0

As per suggested by Mr. Barmar it was causing due to --skip-grant-tables in MySQL.

To disable this option just run FLUSH PRIVILEGES; command in your MySQL CLI and this will solve the issue.

Not the answer you're looking for? Browse other questions tagged or ask your own question.