Zen Cart Logo
Forums / Installing on a Linux/Unix Server / mySQL created & right password yet connection failed?

mySQL created & right password yet connection failed?

Views: 1,456

Results 1 to 4 of 4
3 Jan 2011, 9:03 PM
#1
jago25_98 avatar

jago25_98

New Zenner

Join Date:
Feb 2005
Posts:
20
Plugin Contributions:
0

mySQL created & right password yet connection failed?

Created mySQL database and right password yet connection failed.

The help is only mentioning creating the database and user/pass. Do I need to add some sort of user to the mysql group?

root ~ # mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 36
Server version: 5.0.51a-24+lenny4 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database zencart;
Query OK, 1 row affected (0.01 sec)

mysql> quit
Bye

Then

Connection to Database failed
Lost connection to MySQL server at 'reading initial communication packet', system error: 111

Using the same user & pass of course.

3 Jan 2011, 9:25 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: mySQL created & right password yet connection failed?

Many hosts prepend the control panel user name to the database name on shared servers, so if your control panel user name is jago25, and your database name is store, Zencart will need jago25_store as the DB name in the configure files.

4 Jan 2011, 1:23 AM
#3
jago25_98 avatar

jago25_98

New Zenner

Join Date:
Feb 2005
Posts:
20
Plugin Contributions:
0

Re: mySQL created & right password yet connection failed?

stevesh:

Many hosts prepend the control panel user name to the database name on shared servers, so if your control panel user name is jago25, and your database name is store, Zencart will need jago25_store as the DB name in the configure files.

I tend to prefer things on the command line but I'm happy to install a control panel (cpanel perhaps) if you think it would help this root VPS which I've installed from scratch

-j

4 Jan 2011, 2:08 PM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: mySQL created & right password yet connection failed?

jago25_98:

Do I need to add some sort of user to the mysql group?

No, but you do need to create a zencart user/password and give them access priviliges to the zencart database that you created.

It is possible to use the root user/password to obtain the databse access, but this is very bad practice and needs to be avoided at all costs (those on a shared server don't/won't have root access anyway, but I understand that you have a VPS).

I can appreciate wishing to use the command line (I'm a great fan myself), but in all honesty, when it comes to MySQL I suggest you install phpMyAdmin and use this excellent tool for all of your database administration. You won't reget it.

Cheers
Rod