Home>Article> Detailed explanation of php mysql operation mysql_connect to connect to the database instance

Detailed explanation of php mysql operation mysql_connect to connect to the database instance

无忌哥哥
无忌哥哥 Original
2018-06-27 15:03:14 2348browse

mysql_connect introduction

php mysql_connect is used to connect to the mysql server. This function has multiple parameters, but we generally only need to understand the following three parameters:

mysql_connect(server,user ,pwd)

Parameter introduction:

server -- mysql server address

user -- server user name

pwd - - Server login password

If the connection is successful, a MySQL connection ID is returned, if the connection fails, FALSE is returned.

mysql_connect instance

Thank you for reading, I hope it can help everyone, thank you for your support of this site!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn