Me and my friend had a website. Before closing website he dumped MySQL Database from phpmyadmin and stores it locally on his PC. Now he send me sql file. Is there a way to see if he didn't change/add/remove lines,tables and variables and other stuff from *.sql file ? How he can modify the file so I can't notice that file is modified ?
As you've described the situation, no — if you have the original file or even access to the original database, you could compare what he sent you with what you're able to get yourself. However, with only the file he's provided, there's no way to determine whether it's been edited. The .sql file is simply a plain text file and there's no audit trail that can ensure — after the fact — that he hasn't modified anything.