Help - Search - Members - Calendar
Full Version: Problem Connecting Mysql
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
zeitler
Hi.
I'm newbie in web programming and zimic

A friend of mine told me about zymic and I decided to try a school website in here.

I've uploaded website files and created a database but I'm getting this error:

function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /www/uuuq.com/e/m/a/emanuelvitorino/htdocs/database.php on line 8

I'm using in config file:
$NAME_DB="emanuelvitorino_menuathome";
$USER_DB="emanuelvitorino_root";
$PASS_DB="????????";
$SERVER_NAME="Localhost";

and to connect:
$this -> bd -> connect($NOME_DB,$USER_DB,$PASS_DB,$SERVER_NAME);

I don't understand the error. Can you please help me?

Thanks

Emanuel
swordz
Hi.

Your database name and user name need to be 16 characters or fewer. That is impossible from you current site. The solution is to create a new site with a shorter name, create the db/user on your new site, then connect from your old site.

Also, $this -> bd -> connect($NOME_DB,$USER_DB,$PASS_DB,$SERVER_NAME); has a typo in it.

swordz
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.