Forums / Installing on a Linux/Unix Server / During Zencart Installation, Can't connect to Database. WHy?

During Zencart Installation, Can't connect to Database. WHy?

Locked

Views: 4,035

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
21 Dec 2008, 5:08 AM
#1
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

During Zencart Installation, Can't connect to Database. WHy?

Hi All,

I am installing zencart everything was ok up until i got to the databse setup page. It says that it cannot connect to DB.

Database connect failed
Access denied for user 'my username1'@'PI #' (using password: NO)

I dont use any SSL yet. I saw posting about changing configure.php but no details given.

Kindly help to advise what could be done to resolve this
Thank you for your help in advance

Jason

21 Dec 2008, 5:25 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: During Zencart Installation, Can't connect to Database. WHy?

Usually that means you:

1 made a database

2 made the username

3 added the username to the database ... oops ... betcha missed step 3 ... :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Dec 2008, 5:37 AM
#3
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: During Zencart Installation, Can't connect to Database. WHy?

Hi Ajeh

Thanks for the advice given.
Actually I can still go to next level of installation even though I have this error after I clicked continue for 2 times continuously. I am not sure what will be the error.

After clicking continue at this DB setting page, it loads to the next page with below error

1146 Table 'mydb1.configuration' doesn't exist
in:
[update configuration set configuration_value='/home/www/mywebsite/catalog/cache' where configuration_key='SESSION_WRITE_DIRECTORY']

I reload and it shows "1146 Table 'mydb1.configuration' doesn't exist in:[select configuration_key as cfgkey, configuration_value as cfgvalue from configuration]"

What should I update or add looking at this error sentence?
Do let me know the correct file, directory and what to be done?

Thanks a lot

Jason

21 Dec 2008, 5:44 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: During Zencart Installation, Can't connect to Database. WHy?

If you peek in phpMyAdmin and refresh the database at this point ... do you see anything in the database tables?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Dec 2008, 5:55 AM
#5
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: During Zencart Installation, Can't connect to Database. WHy?

Hi Ajeh

Thanks for helping out. Really appreciate it.
I went to phpadmin, seeing my still alive mydb1 database.
I clicked it and all I am prmpt to do is to create new table for mydb1.
It has given me the blank fill to put down new name and number of fields before I can click go.
So should I be doing this table creation? I am not sure what will be the DB fields and parameter I need.
If for the sake of this zencart installation, I have to simply create some table, then I would do for sure. ( I did not do earlier as I worried I cant revive anything, I have tried installation and files upload for 6 times and quite tiring since each time I have many obstacles...)

Thanks to help out

Jason

21 Dec 2008, 6:07 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: During Zencart Installation, Can't connect to Database. WHy?

If you have created a clean, empty table ...

Then you create a username and password ...

Then you add the username to the table with All Rights checked ...

you should then have full access to the new, empty database table so that when Zen Cart installs it can access it to add all of the database table structure and data ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Dec 2008, 6:25 AM
#7
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: During Zencart Installation, Can't connect to Database. WHy?

Hi Ajeh

In fact as mentioned I have the DB name and password created. It is empty but not sure how clean it is.

I still have errors goes:
"1146 Table 'mydb1.configuration' doesn't exist in:[update configuration set configuration_value='/home/www/myweb.freehostia.com/catalog/cache' where configuration_key='SESSION_WRITE_DIRECTORY']
"

WHat are the table and configuration refer to? What can I do to resolve this?

Using test.php file in my website, the connection of DB works and shows it can be connected with username, password I have.

Thanks to help

Jason

21 Dec 2008, 7:07 AM
#8
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: During Zencart Installation, Can't connect to Database. WHy?

Hi All

The status of the web browser is done during this error reporting.
It is showing the installation in progress

Then this page stay there and without any progress even I keep waiting.
I tried reloading, it went back to previous page where I have to key in details for the DB setting all over again

Kindly help

Jason
++++++++++++++++++++++++++++++++++++
Installation In Progress...

1146 Table 'mydb1.configuration' doesn't exist
in:
[update configuration set configuration_value='/home/www/myweb/catalog/cache' where configuration_key='SESSION_WRITE_DIRECTORY']

+++++++++++++++++++++++++++++++++++++++

21 Dec 2008, 1:20 PM
#9
stevesh avatar

stevesh

Black Belt

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

Re: During Zencart Installation, Can't connect to Database. WHy?

Are you sure you're giving Zencart the correct database name?

Many shared hosting accounts prepend your account user name to the database name, so if you create a database named mydb1, and your hosting control panel user name is **wombats **the database name you would need to supply to the Zencart installation would be wombats_mydb1. Same with the database user name if you create one specifically for Zencart.

21 Dec 2008, 2:18 PM
#10
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: During Zencart Installation, Can't connect to Database. WHy?

Hi Stevesh & All

Thanks for helping out.
I confirmed the database name is correct.
The reason is when I use different name, it will give me connection is denied as the error.
For my case, it is about table for a .configuration extension file does not exist.
Is there any way to locate this file and correct it?

1146 Table 'mydb1.configuration' doesn't exist
in:
[update configuration set configuration_value='/home/www/myweb/catalog/cache' where configuration_key='SESSION_WRITE_DIRECTORY']

Thanks to help, please

best rgds
CheangLong

21 Dec 2008, 2:24 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: During Zencart Installation, Can't connect to Database. WHy?

Your 'configuration table not found' error messages are a result of the system being unable to actually create the required tables in the database. So, you must find out why the tables cannot be created. If the user is not connecting, then that's probably the real problem:

myjasonlee:

Database connect failed
Access denied for user 'my username1'@'PI #' (using password: NO)
That error message means that when the installer attempted to connect to your database named 'PI #' using the username 'myusername1' and a blank password, it was unable to authenticate.

Possible causes:

  • you supplied a blank password. (You should never use a blank password)
  • you have not GRANTed the 'my username1' user sufficient permission to connect to the 'PI #' database. You should be granting all privileges to the user
  • or perhaps the 'my username1' user doesn't exist and/or the 'PI #' database doesn't exist on the database server you specified

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Dec 2008, 2:29 PM
#12
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: During Zencart Installation, Can't connect to Database. WHy?

Hi DrByte

The connection problems solved after I deleted the DB and created a new one again.

Now the new problem came. It is about table for a .configuration extension file does not exist.
Is there any way to locate this file and correct it?
I purposely tried with a wrong DB name and it showed me connection failed. So for this configuration issue, there is no DB connection problem. It is about setting of configuration?

1146 Table 'mydb1.configuration' doesn't exist
in:
[update configuration set configuration_value='/home/www/myweb/catalog/cache' where configuration_key='SESSION_WRITE_DIRECTORY']

Thanks

Jason

21 Dec 2008, 2:37 PM
#13
drbyte avatar

drbyte

Sensei

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

Re: During Zencart Installation, Can't connect to Database. WHy?

myjasonlee:

1146 Table 'mydb1.configuration' doesn't exist
That error message means: "When the software connected to the database using the username+password+server information you provided, it couldn't find the table named 'configuration'.

The installer, if it can connect properly, will automatically create the table named 'configuration'.

Thus, if your database doesn't contain any tables, then your permissions you've GRANTed for the username+password+server are not high enough to allow the installer to operate properly.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Dec 2008, 3:16 PM
#14
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: During Zencart Installation, Can't connect to Database. WHy?

Hi DrByte

What you sounded seems very logical.
I emailed to web hosting help desk.
If you have any idea what to be modify , do let me know.
Mean time, I am waiting for the other side to respond .
Thanks Sensei!

Jason

14 Oct 2009, 9:06 PM
#15
kibb avatar

kibb

New Zenner

Join Date:
Dec 2008
Posts:
9
Plugin Contributions:
0

Re: During Zencart Installation, Can't connect to Database. WHy?

This may help someone, it worked for me when receiving the "1146" error, and I had checked all configure.php settings and all were correct.

The "mysql_zencart.sql" file that exists in the Zen Cart install directory "zc_install/sql/" is the key. I user PHPMyAdmin to connect to the database, then click the "Import" tab, and import that mentioned sql file. This builds the initial database structure.

Once that step was complete, then running "http://mywebsite.org/zc_install" proceeded without that blasted 1146 error.