Connectivity Mysql Database with Php in Details

MySQL information source name or DSN : determines the location of the MySQL database server. You can utilize IP address or server name e.g., 127.0.0.1 or localhost
MySQL database name: demonstrates the name of the database to which you need to associate.
Username and secret phrase: indicate username and secret phrase of the MySQL's client that you use to associate with the mysql connect database with php server. The record must have adequate benefits to get to the database indicated previously.

The neighborhood MySQL database server so the DSN is localhost .
The classicmodels as the example database.
The root account with a clear secret key, only for show.
 you originally introduced XAMPP, it just made the username for it to be gotten to, you presently need to add a secret word to it independent from anyone else.
PHP gives mysql_connect capacity to open a database association. This capacity takes five parameters and returns a MySQL interface identifier on progress, or FALSE on disappointment.
Its least difficult capacity mysql_close PHP gives to close a database association. This capacity takes association asset returned by mysql_connect work. It returns TRUE on progress or FALSE on disappointment.

In the event that a second call is made to mysql_connect() with similar contentions, no new connection will be built up, however rather, the connection identifier of the officially opened connection will be returned. The new_link parameter changes this conduct and makes mysql_connect() constantly open another  mysql database connection, regardless of whether mysql_connect() was called before with similar parameters. In SQL experimental mode, this parameter is overlooked.

Comments

Popular Posts