

Remember this password as it will be used to connect to your Database. Now click Edit privileges and go to Change Admin password, type your password there and save it.

For this, you have to go to User account where the user is the same as the one shown in this picture: When you first installed XAMPP, it only created the username for it to be accessed, you now have to add a password to it by yourself. Open your browser and go to localhost/PHPMyAdmin or click “Admin” in XAMPP UI. It’s a control panel from where you can manage the database that you’ve created. Create MySQL Database at the Localhostīefore you start building PHP connection to MySQL database you need to know what PHPMyAdmin is. In this article, I’ll discuss how to connect MySQL Database on different servers and I’ll also give you an overview of connecting Database using PDO. The major advantage of using PDO is that your code stays simple and portable. It also gives you the freedom to work with multiple databases.

It is like an interface for the backend to interact with the MySQL database and make changes without making any change in the PHP code. PHP Data Objects (PDO) extension is a Database Abstraction Layer. The API was designed to support MySQL from version 4.1.13 to newer ones. MySQLi was introduced with PHP 5.0.0 and the drivers were installed in 5.3.0. It works just like the previous version, but it is safer and faster, and provides a better set of functions and extensions. MySQLi is an API used as a connector function to link the backend of the PHP app to the MySQL database. Mysql() is now obsolete because of security issues like SQL injection etc, but the other two are being actively used. There are three types of methods in PHP to connect MySQL database through backend: Connect MySQL with PHP code, you can make use of one of three methodologies. Its ability to handle huge volumes of data without breaking a sweat is one of its biggest selling points. Follow is a highly popular database management system that can power projects of all sizes.
