If you are trying to access the SQL server remotely using navicat on your computer, you need to allow remote connections on your SQL command client.. open it up and run a query similar to..
GRANT USAGE ON *.* TO 'root'@'YOUR SERVER IP' IDENTIFIED BY 'passwordhere';
hit enter.
then type FLUSH...
I can only notice one security issue in your code (there may be more), is your input $_POST fields.. depending on what CMS you're using it has a different filter function..
ie. $bday_day = $_POST['bean_day'];
should be $bday_day = filter($_POST['bean_day']); or secure($_POST['bean_day']) -...