Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 5 of 5

This is a discussion on Working with databases in the Shared & Semi-Dedicated forum
I'm trying to set up an OSCommerce shop. I have an existing one and am fairly familar with the settings required. I prefer to have ...

  1. #1
    JPC Senior Member
    Join Date
    Jul 2004
    Posts
    79

    Working with databases

    I'm trying to set up an OSCommerce shop. I have an existing one and am fairly familar with the settings required. I prefer to have a number of shops with their own databases for testing. I have been told a few things by tech support that don't seem right so I'm asking here for another view.

    I want to be able to create a new database, name it what I want and be able to set the password to what I want. According to texh support, this is not possible. If I want to upload my existing files I have to go through these steps:

    Create a new shop via CPanel
    Delete all of the files that were just created, keeping just the directory
    Upload my files to that directory
    Delete all of the tables just created in the new db
    Upload my db

    Is this really the only way to do it? It's a lot of extra work and I don't have any control over the variables (db name & password). It seems like a backwards way of doing it so I'm thinking I must be misunderstanding the procedure.

    I've been on five different hosts and on each one I could just upload my files, create a db and upload my sql file. No reason for all of the extra deletion and I had control of the variables. Please tell me there is a way to do this on this host.

    Jack

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    You can do a fully manual install. Just grab the latest version of OSC from the OSC site and follow the instructions. As for databases, you'll need to create it through CPanel, but you can name it anything you want (the name you chose will get prefixed with your cpanel username, however). Then you can upload your dump file (I assume that's what you have) and let that create your tables and populate them.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    JPC Senior Member
    Join Date
    Jul 2004
    Posts
    79
    That's the method I thought would work and the one that makes the most sense to me. But when I tried it, I couldn't access the new database I created because it was tied into the one created by CPanel somehow. Here's what happened:

    When you use CPanel to add OSC, it creates the database. I did this initially to test it. So I had the basic shop files it created as well as a database named mysite_osc1. So then I tried just creating another database, without creating the OSC shop. This one I named mysite_shop. I uploaded my existing OSC files and pointed the configure files to the new database, mysite_shop. But when I tried to use it, it kept saying access was denied and would reference the database mysite_osc1. When I looked at the db in CPanel, there is a section titled "Grant permissions on a MySQL database to a MySQL user." I'm not sure what this is for but it had mysite_osc1 listed and I couldn't change it. When I asked tech support the reply said that I couldn't change it and that I was doing it wrong.

    I just tried it again. Please explain where I am going wrong. I have an existing db named mysite_osc1. I went into CPanel and created another db named mysite_alone. I then went back to view my db's in CPanel. In the Grant permissions section, it says Username = mysite_osc1. This seems to be the problem. How do I change this?

    Jack

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    OK, I see the problem. You're confusing databases and users. For each database you create you need to add at least user. You can set up a different user for every database or use one user account for every DB. In the case of the CP installed scripts, the database name and the user account are usually the same.

    In a nutshell, here's what you need to do:

    1. Create database in CPanel (you know how to do this).

    2. Create a user account in CPanel (the next form down from the one where you create the database).

    3. Use the Grant Permission form to link the DB and USer together. Then you should be able to import your data.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  5. #5
    JPC Senior Member
    Join Date
    Jul 2004
    Posts
    79
    Thanks Jason. I had to get the other problem with the paths sorted out before I could test this but I was finally able to and it works great doing it this way. I appreciate the help.

    Jack

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •