RRcoder
6/2/2018 - 9:13 PM

Test de conexion a mysql desde php

<?php
    $dbhost = 'localhost';
    $dbuser = 'root';
    $dbpass = 'flash';

    $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ( 'Error connecting to mysql');

    if ($conn) {
    echo 'CONNECT OK';
    }   

    $dbname = "mysql";
    mysql_select_db($dbname);
  ?>