mysql_real_connect( <mysql>, <host>, <user>, <pass>, <db>, <port> )


Module: MySQL

Summary:

Attempts to establish a connection to a MySQL database engine. Returns a connection handle if the connection was successful or 0.



Example:

connection_handler = mysql_real_connect( mysql_handler, "localhost", "username", "password", "database", 3306);



Required Args:

  • 1 : <mysql> initialized MYSQL handler
  • 2 : <host> host where the database runs on (like localhost)
  • 3 : <user> username of the database
  • 4 : <pass> the password of the username
  • 5 : <db> database name
  • 6 : <port> database port (default 3306)