Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Can't connect to database during installation

Can't connect to database during installation

Locked

Views: 3,952

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
28 Sep 2007, 7:32 PM
#1
isaacr25 avatar

isaacr25

Zen Follower

Join Date:
Jul 2007
Posts:
174
Plugin Contributions:
0

Can't connect to database during installation

I'm in the process of installing zen-cart, and the installer keeps telling me that it can't connect to the database. I've double-checked that everything is typed in correctly (db name, password etc). One of the first questions that's asked is for a Store Identifier (Table Prefix). I'm leaving this field blank. Is this the cause of the failure? If so, what do I used for the prefix? I came across nothing about a prefix when I was creating the database. Thanks.

28 Sep 2007, 9:20 PM
#2
araunah avatar

araunah

New Zenner

Join Date:
Dec 2004
Location:
The Internet
Posts:
76
Plugin Contributions:
0

Re: Can't connect to database during installation

Did you create a dbuser in your control panel ? if yes, did you make sure that the user was added to the database ? if you are using cPanel, the user has to be added to the database after you created it.

29 Sep 2007, 12:30 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can't connect to database during installation

The store-identifier, or "prefix", is entirely optional, and we recommend that you leave it blank.

What details are being provided along with the "cannot connect" error?

29 Sep 2007, 3:26 AM
#4
isaacr25 avatar

isaacr25

Zen Follower

Join Date:
Jul 2007
Posts:
174
Plugin Contributions:
0

Re: Can't connect to database during installation

Araunah,
When creating the database in Network Solutions, a user was created as well. If I look at the config of the database, it shows a dbuser, which I'm using when installing the zen cart.

DrByte,
Here is the rest of the error message:

Connection to Database failed
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
A connection to the database could not be made. This can happen for a number of reasons.

You may have given the wrong DB host name, or the user name or password may be incorrect.

You may also have given the wrong database name (Does it exist? Did you create it? -- NOTE: Zen Cart™ does not create a database for you.).

Please review all of the entries and ensure that they are correct.

29 Sep 2007, 3:43 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can't connect to database during installation

isaacr25:

Network Solutionsbuyer beware

isaacr25:

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)What are you entering for the "Database Host" setting?
It is likely that your host isn't using "localhost" for the database, so you'll need to enter the correct address for the server where the database is located ... which is likely indicated in the same screen where you set up the database and user.

29 Sep 2007, 4:12 AM
#6
isaacr25 avatar

isaacr25

Zen Follower

Join Date:
Jul 2007
Posts:
174
Plugin Contributions:
0

Re: Can't connect to database during installation

I just tried using the domainname.com, as well as the ip address, and I still cannot connect to the db.

29 Sep 2007, 4:21 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can't connect to database during installation

Does your phpMyAdmin perhaps tell you the name/address of the database server?

29 Sep 2007, 4:28 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can't connect to database during installation

Googling for Network Solutions support brings one to this page:
http://customersupport.networksolutions.com/category.php?id=125

From there, they have several FAQs:

Creating/locating database server settings:
http://customersupport.networksolutions.com/article.php?id=301
http://customersupport.networksolutions.com/article.php?id=394

Connecting to database from an application:
http://customersupport.networksolutions.com/article.php?id=403
excerpt:> - >

  • MySQL Server Name equal to the** IP address of your Network Solutions MySQL server.**
  • User Name / Password equal to your MySQL database username / password.
  • Database equal to the name of your MySQL database.

What is the ** IP address of your Network Solutions MySQL server** ?
Use that as your Database Host setting when installing Zen Cart.

29 Sep 2007, 4:29 AM
#9
isaacr25 avatar

isaacr25

Zen Follower

Join Date:
Jul 2007
Posts:
174
Plugin Contributions:
0

Re: Can't connect to database during installation

Here is what my phpadmin page shows:

https://www.mwebdev.com/misc/dbadmin.jpg

29 Sep 2007, 4:30 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can't connect to database during installation

As an aside, it's worth noting that you'll most likely be unable to use SSL to protect your checkout area if you're using Network Solutions hosting in conjunction with Zen Cart and many other ecommerce applications.
It's a known limitation that Network Solutions is apparently unwilling to fix.

If you're just getting started, a different host would be advised.

29 Sep 2007, 4:32 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can't connect to database during installation

isaacr25:

Here is what my phpadmin page shows:

https://www.mwebdev.com/misc/dbadmin.jpg

Are you using jos as your username ?
What is 205.178.146.31 ?

29 Sep 2007, 4:34 AM
#12
isaacr25 avatar

isaacr25

Zen Follower

Join Date:
Jul 2007
Posts:
174
Plugin Contributions:
0

Re: Can't connect to database during installation

Are you saying that I won't be able to use SSL at all with Network Solutions? My client chose Network Solutions a while ago, so I had no say in the matter. Now that they've added hosting etc., I don't think they'll be very happy to have to purchase hosting with another company.

29 Sep 2007, 4:52 AM
#13
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,616
Plugin Contributions:
0

Re: Can't connect to database during installation

A search of the forum will bring up several threads with NetSol problems.

29 Sep 2007, 4:55 AM
#14
isaacr25 avatar

isaacr25

Zen Follower

Join Date:
Jul 2007
Posts:
174
Plugin Contributions:
0

Re: Can't connect to database during installation

DrByte:

Are you using jos as your username ?
What is 205.178.146.31 ?

I am using jos as the user name. That's the server ip address.

29 Sep 2007, 5:34 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can't connect to database during installation

isaacr25:

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)> isaacr25:

I just tried using the domainname.com, as well as the ip address, and I still cannot connect to the db.

Usual options are:

  • localhost
  • server IP address
  • a specific name like mysql2.my_hostingco.com
  • etc

If using localhost or the server's IP address doesn't work and you can't find the database server address in your control panel, you'll have to contact their customer support department.