Any recommendations for scanning sensitive PII data for MySQL database ? Is there scripts/sql which we can use ?
That is a pretty huge topic. You’d first have to identify what you consider to be PII, and what tables/fields it could be present in. And then as far as searching for it, you’re limited either filtering through the data using the usual SQL query techniques, or exporting the data and processing it externally (i.e. you could use grep to parse through a mysqldump). Either way, that is going to be a pretty monumental and likely futile task due to the sheer number of possible values and variations that could be considered PII. Your best bet is limiting what goes into the database in the first place, hashing the data before it goes into the database, and/or simply putting in mitigating controls like restricting who has access to the server and who can connect to MySQL.
If you further explain what the purpose of your search is, someone might have suggestions on other ways to go about it as well.