drxela
New Member
- Messages
- 5
- Reaction score
- 0
- Points
- 0
Hello, everyone... Well, I got a problem to... understand how work the connection of my MySql DB, I tried many things but nothing was good, got problem on sql connect, on db select, etc...
So I want to know what is the good username to use, and name of DB, for my SQL
I give you my connexion.php, maybe you can explain me my errors...
-----------------------------
<?php
$hostname = 'localhost';
$user = 'drxela_kamas';
$password = '******';
$nom_base_donnees = 'drxela_kamasBD';
$conn = mysql_connect($hostname, $user, $password) or die('Erreur de connexion '.mysql_error());
mysql_select_db($nom_base_donnees, $conn) or die('Erreur de selection '.mysql_error());
?>
----------------------------
Like you see here, I create a DB, named 'kamasBD' that x10 named 'drxela_kamasBD' on the cPanel.
It's same for the user, and I gave to him all privilieges.
And in my .php, I call this connexion.php like that :
include('connexion.php');
Something bad ? I must do require ?
Thanks for any help about this.
So I want to know what is the good username to use, and name of DB, for my SQL
I give you my connexion.php, maybe you can explain me my errors...
-----------------------------
<?php
$hostname = 'localhost';
$user = 'drxela_kamas';
$password = '******';
$nom_base_donnees = 'drxela_kamasBD';
$conn = mysql_connect($hostname, $user, $password) or die('Erreur de connexion '.mysql_error());
mysql_select_db($nom_base_donnees, $conn) or die('Erreur de selection '.mysql_error());
?>
----------------------------
Like you see here, I create a DB, named 'kamasBD' that x10 named 'drxela_kamasBD' on the cPanel.
It's same for the user, and I gave to him all privilieges.
And in my .php, I call this connexion.php like that :
include('connexion.php');
Something bad ? I must do require ?
Thanks for any help about this.