BD MySQL with chez.com

Rusmaster -  
 idir -
Hello and thank you for your attention,

I am creating a site for learning the basics of the Russian language on the "chez.com" server.
This server includes PHP and MySQL.
My homepage (.php) contains an HTML form:

<form name="formrusse" action="bform.php" method="post">....

The data is sent to "bform.php":


<?php
$pseudo = $_POST["pseudo"];
$pays = $_POST["pays"];
$region = $_POST["region"];
$email = $_POST["email"];
$age = $_POST["age"];
$message = $_POST["message"];
$today=date("d-m-Y");
$now=time("H/i/s");
$fh = fopen("formul.txt","a");
fwrite($fh,$today);
fwrite($fh,$now);
fwrite($fh,"\n");
fwrite($fh,$pseudo);
fwrite($fh,"\n");
fwrite($fh,$email);
fwrite($fh,"\n");
fwrite($fh,$pays);
fwrite($fh,"\n");
fwrite($fh,$region);
fwrite($fh,"\n");
fwrite($fh,$age);
fwrite($fh,"\n");
fwrite($fh,$message);
fwrite($fh,"\n");
fclose($fh);
?>

Of course, I would like these variables to be stored in my database.

This is where the hair-pulling or what's left of it begins.
I want to create a database (BDrusse)
with tables (pseudo, mail, country.....)
To create a database, you need to connect, right?
To connect, we do a script like:


<?php

echo "attempting to connect to the database"." / ";
$connect=mysql_connect("baserusse","rusmaster","xxXXyyYYxX")

or die ('connection error to MySQL'.mysql_error())." / ";
echo"connection OK"." / ";
.......
?>

where "baserusse" is the server, "rusmaster" the user and the 3rd attribute the password that chez.com gave me.

If the connection is OK, we can create the database with a script like:

<?php

$sql='CREATE DATABASE BDrusse';
if (mysql_query($sql,$connect))
{
echo "Database created successfully\n"." / ";
} else {
echo 'Error creating database: ' . mysql_error() . "\n"." / ";
}


And if all went well, we disconnect with:

mysql_close($connect);

And here's what I get in return:

attempting to connect to the database / connection OK / Error creating database: Access denied for user 'baserusse'@'172.20.%' to database 'BDrusse' /

Some of the thousands of questions I have.
Did my connection attempt succeed?
If so, as it seems to indicate, why am I being denied access for creation?
What's with this IP (172.20.%) when the IP of chez.com is 212.27.63.127?

Thank you for clarifying... ;)
Configuration: Windows XP Internet Explorer 7.0

2 answers

Rusmaster
 
Hello,

Is there anyone who can tell me what's wrong?
Or at least tell me that everything looks fine and that he doesn't understand why it's not working?

Thanks ;)
0
PapySoso
 
Hello,

I have the same problem as you for managing a MySQL database remotely. For now, it doesn't seem possible to use PhpMyAdmin with the host chez.com. I have retrieved FlashMyaAdmin (http://www.flashmyadmin.org/original/flashmyadmin.org.php?action=download) which you can unpack locally on your machine and then transfer to your hosting space.
To manage your database, simply enter the URL http://yourSite.chez.com/flashmyadmin in your preferred browser and then provide your personalPageName and the MySQL access password.

Best regards.
PapySoso
0
idir > PapySoso
 
Please, can you explain to me how it works, because I have tried everything, but it doesn't work.
Thank you.
0
Rusmaster
 
Well! My problem doesn't interest anyone :(
0