Apart from Thisaru's answer, do you have a MySQL db running locally? Can you verify it by connecting via CLI?
mysql -h localhost -P 3306 -u root -p
USE testdb;