Minimize Text   Default    Enlarge Text

How do I create a MySQL database for Zen Cart? And what permissions/privileges?

Print
Save to list
Subscribe
To use Zen Cart, you need a database.

To prepare a MySQL database for Zen Cart to use:

  1. Open your hosting account's control panel.
  2. Find the "Databases" section
  3. Choose the MySQL option
  4. Click on the option to Create a database.  Enter a name for it and submit. (Record the name for use in Zen Cart)
  5. Now create a user and password. (Record these for use in Zen Cart)
  6. Now you need to "grant" or "assign" the user to the database, granting appropriate permissions.  See the section about Permissions, below.
That's it !!

Now in the Zen Cart Installer, on the Database Setup section, supply all of the database information you just set up: name, user, password, and host. Usually the "host" is "localhost" unless your hosting company uses a specific different configuration.


What Database Permissions/Privileges Do I Give to my Database User?

For the purposes of Zen Cart sites, the following permissions ("privileges") are required for the database user:
  • SELECT
  • INSERT
  • UPDATE
  • DELETE
  • FILE  (not used by core code, but easiest to leave it checked)
  • CREATE
  • ALTER
  • INDEX
  • DROP
  • CREATE TEMPORARY TABLES (not required by the core code, but may be required by some addons)
  • LOCK TABLES  (not used by core code; required only for database backups)
If you're using a cPanel hosting account, you would usually check the box for "ALL PRIVILEGES" instead of checking off individual options.
Using any of the optional items noted above does not create any significant security risk.  Recommended approach for most storeowners is "All Privileges".




Related Articles
Connection to Database failed ... Access denied for user: 'myname@localhost' (Using password: YES)
This suggests you have something wrong with any of: - username - password - database name - database host/server - security settings on your database When you...
During installation I see an error: "1142 DROP command denied to user: 'jason@localhost' ... DROP TABLE IF EXISTS
To use Zen Cart, you need to grant the "user" of your MySQL database the right privileges for security access. For normal Zen Cart operation, you should grant at...
Fatal error: mysql error: [1: Can't create/write to file '/var/tmp/#sql_9469_0.MYI' (Errcode: 28)] (or any other errors related to a .MYI file)
CAUSE: The MySQL daemon/engine on your server has run out of (allowed) space for storing its own database files. If the filename/path mentioned includes...

 


Copyright © 2003 - 2009 Zen Ventures, LLC
Get Zen Cart E-Commerce Shopping Cart at SourceForge.net. Fast, secure and Free Open Source software downloads