-
setup-database setup
hi i am setting up zen-cart for the first time and i have created a database name to put zen-cart in and now i have got to name a table for the database and put in a number of fields. can i just name it the same as the database? and how many fields should i put in?
-
Re: setup-database setup
You don't need to populate the database. Just create the DB (usually using your host's control panel), then run the Zencart installation and enter the DB user and password when asked, and Zencart will create tables, etc.
-
Re: setup-database setup
To elaborate a little on steve's post.
Use your host account CPanel (or equivalent) to create a database. Give the database a NAME, when prompted. There will be a field to input this.
Then, you must create a USERNAME and a PASSWORD for that database.
That's all you need do on your server for the database.
Make a note of:
The database NAME
The database USERNAME
The database USER PASSWORD.
The installation process will ask you for this information.
Upload all the zencart files to the server. Read the installation instructions in the DOCS folder first!
When you've prepared everything, run the zencart install program.
If you are a first-time user, I strongly recommend you install the DEMO products. This will speed up the rate at which you learn how to use and configure things in your new shop.
-
Re: setup-database setup
To elaborate on schoolboy's elaboration - most shared hosts will add your control panel user name to the beginning of your database name and your database user name.
So, if your host is one of those, and your control panel user name is graigearl and you name the database 'zencart', you'll need to tell the Zencart installation that the DB name is craigearl_zencart
Something to keep in mind if your installation doesn't work.
-
Re: setup-database setup
Schoolboy:
The database I am using was the database of a Zen Cart on a different server, so the tables and fields are the same, but there are a few extra tables.
Your 3rd instruction gives me pause: "...then start to work out ways in which to get the data from this original database, into the zencart database..."
My tendency, since all the tables are the same, is just import the sql file that I exported from the original database. Would there be a problem with that. Or are you suggesting some other way of importing the data into the db?
Stevesh: The db was properly named but thanks for the heads up.
-
Re: setup-database setup
As there are table differences, using INSERT INTO sql commands is likely to result in errors, because the exports from database "A" will contain extra tables/fields. You will have (by way of example) sql that says "Insert this data into table xxxxxxx" and unless you have that table (and its structure), properly configured, you'll get errors.
If your host allows you to create additional databases, I would suggest the following...
Create a NEW empty database.
Assign it user and passwords in the normal way.
Get (from the OTHER zencart site) a full SQL dump via the phpMyAdmin - where that dump must comprise CREATE IF NOT EXISTS and full INSERT INTO lines.
Then, import that dump into the empty database... you can do this in a variety of ways through phpMyAdmin... but basically you will have an exact copy of the database that is on the other zencart site.
Then, by editing the database DEFINE statements in your two CONFIGURE.PHP files, point the website to that new database.
You will probably need to run fix_cache_key.php (or go to the webshop admin >>> configuration >>> sessions screen and put in the new path to the cache folder.
This "new" database must be compatible with the version of your software... If the old site is a lower version - say 1.3.6, and you then point a 1.3.8 site to it, you will possibly get errors and/or a screen message telling you to patch the database to a higher level... in which case you need to do a database upgrade (similar to an install, but just upgrading the dbase...