Data not going into mySQL db

That isn’t the command to connect to the database - you should be using either mysqli_connect or new mysqli with four parameters including the user and password for the database.

http://php.net/manual/en/function.mysqli-connect.php or http://php.net/manual/en/mysqli.quickstart.connections.php

Also there’s no reason for an upperr limit on password length - once ytou use the supplied password function password_hash all passwords whether 6 or 60000000 characters long will all have the same length encrypted value to store in the database.

http://php.net/manual/en/ref.password.php