database

Status
Not open for further replies.

aircar

New Member
Messages
8
Reaction score
0
Points
0
I recieve the following message when trying to use my database with an auto set-up - Lost connection to MySQL server at 'reading initial communication packet', system error: 111 - The scriptI'm using goes like this

$database['host'] = '127.0.0.1';

$database['username'] = 'aircar';

$database['password'] = '--------';

$database['database'] = 'cart';

$database['prefix'] = 'aircar_';

//================================

$connect = @mysql_connect($database['host'] , $database['username'] , $database['password']);

if (!$connect)
{
die (mysql_error());
}
mysql_select_db($database['database'], $connect) or die (mysql_error());


any thought???

regards aircar
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Host is 'localhost'

Your username would be of the form: aircar_username
Your database would be of the form: aircar_cart
The last two should be created via the MySQL Databases tool in cPanel and the user assigned to the database with ALL_PRIVILEGES (make sure you check it when the popup appears).
 

taha116

Member
Messages
505
Reaction score
0
Points
16
if u cant solve this urself im preaty sure i can do it for u if ur willing 2 mail me the file ( excpt the pass i supose unless u feel safe sharing it )

A screenshot of ur mysql database page in cpanel and users wld help also so that I know exactly what to put cuz i know when i first started out it was very confusing for me 2 know what to put where
 

aircar

New Member
Messages
8
Reaction score
0
Points
0
Thanks for the quick responce to both descalzo and taha116. I will try your suggestion, and you are right on, when first starting it seems pretty confusing.

regards

aircar

---------- Post added at 04:27 AM ---------- Previous post was at 04:02 AM ----------

Changed to localhost and response was
Access denied for user 'aircar'@'int.fris.x10hosting.com' (using password: YES)
aircar_aircar set up as user with full access and response was
Access denied for user 'aircar_aircar'@'int.fris.x10hosting.com' (using password: YES)
changes to aircar_cart and response was
Access denied for user 'aircar_aircar'@'int.fris.x10hosting.com' (using password: YES)

any other helpful hints. The script is part of a larger program bought for a few dollars, but this part is supposed to auto set up the data base and connect with it every time. maybe I need a different script to connect. the above outline is all of the autoconnect script, it's that simple and that may be the problem, as it just doesn't connect.

regards

aircar
 
Status
Not open for further replies.
Top