The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

help for renaming prefix of db via cPanel

Discussion in 'Database Discussions' started by Kerrith, Nov 16, 2006.

  1. Kerrith

    Kerrith Member

    Joined:
    Nov 7, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I successfully installed phpBB 2.0.21 in a directory named /forum/. The db name is phpbb_mydb. The db username is phpbb_username

    Mistakenly I tried to rename the directory. Via FTP I changed the name from /forum/ to /forums/ but it caused lots of problems.

    Now I'm trying to install another phpBB forum but I need the directory name to be /forums/. It needs to use the same db. Once the new /forums/ is up and running I'll delete /forum/

    I installed the second forum naming it /forums/ and ran /install/install.php and got:
    I asked for help and a poster replied:
    After reading the answer I ran /install.php again and in the configuration page I changed the prefix of the db name from phpbb_mydb to phpbb2_mydb. I also changed the db username from phpbb_username to phpbb2_username —and I got all sorts of errors.

    My questions:

    1. Do I need to change the db prefixes in MySQL also?
    2. If yes, how do I do this?
    3. Do I change both the db name and the db username prefixes in MySQL?

    In MySQL I tried creating a new prefix named phpbb2_mydb and it came out as phpbb2_phpbb2mydb so I must have done something wrong.

    Any examples would be appreciated.

    Thanks,

    Kerry
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You can install as many of them as you have databases. The database name needs to be different for each forum though. (unless you're installing two into one DB, and then yes you'd need to change the prefix)

    So, you'd create a new DB in cPanel, and use those details for the new forum setup.
    To add another forum, create another DB in cPanel and use those details for the second forum setup.
    Each DB can have the same user and same password. But not the same DB name.
     
  3. Kerrith

    Kerrith Member

    Joined:
    Nov 7, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I have a db named phpbb_mydb. From what I understand I have to duplicate it but give it a different prefix such as phpbb2_mydb.

    I need step by step instructions on how to do this.

    Thanks,
    Kerry
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Ignore what the poster at phpbb told you. You don't want to install a second forum INTO the first forum. That's why you'd rename the prefix, so a second set of the same tables could be used inside 1 database.

    To be more precise:

    Let's assume your cPanel user account name is Kerrith
    And let's assume your database is named phpbb_mydb
    This would mean the database in the config for the forums is Kerrith_phpbb_mydb
    (a bit confusing)

    So let's start from scratch forget all the above:
    (BTW, these questions should be directed at your host, not the cPanel forums)
    You want to setup a phpbb forum.

    1st you create a DB in your cPanel. Let's call it myforums.
    Then you'll add a user and password and then add that user to that databsase. Let's use Kerrith.
    All done via cPanel MySQL area.

    Now you upload your phpbb files to the correct directory. /forums/
    Next you'll run the install script provided.

    Keeping in mind the actual cPanel username is Kerrith, and the database username is also Kerrith
    When it asks for the username, databasename, and password, use this:

    Kerrith_Kerrith - this is your database username.
    yourpassword - this is your password for that database
    Kerrith_myforums - this is your database name

    Now if you want a second forum, you'd create a second database via cPanel MySQL area same as above, only give it another name.

    The original database is myforums
    So create a second called myforums2
    Create a new directory called forums2 and upload files to it.
    When running the installer script use these details.

    Kerrith_Kerrith - this is your database username.
    yourpassword - this is your password for that database
    Kerrith_myforums2 - this is your 2nd database name

    You can use the same database username & password on both forums databases. But that user must be added to each database. And each database needs it's own name.

    The database username and the database name itself are prefixed with the actual cPanel username.

    All that said, I don't suggest you use phpbb at all. If you're looking for a good free forum, use this one.
     
  5. Kerrith

    Kerrith Member

    Joined:
    Nov 7, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I feel so dense.

    What I have so far is a forum named
    /forum/
    DB Name: phpbb_mydb
    DB UserName: phpbb_username

    Let's use these names as though they are the real ones.

    What I got from your instructions is that via cPanel MySQL I should create a new db and name it:

    DB Name: phpbb_mydb2
    DB Username: phpbb_username
    and that this will bring up the same members and posts that are on /forum/ but I'll be able to bring it up via /forums/ (providing I enter the new db name) in the install.php.

    is this correct?

    I'm willing to do it but this dummy doesn't understand how a new db named phpbb_mydb2 can access the posts from phpbb_mydb.

    Here's the results I want:

    I want to be able to click managercoaching.org/forum/index.php and managercoaching.corg/forums/index.php and have both be the exact same same posts. Once I can do this I will delete /forum/

    Thanks for your patience,

    Kerry

    Yes, I do get it about asking my host but Russian appears to be their native tongue. They are very responsnisve but it take at least a dozen emails for me to get across the question and to get an answer I can comprehend. "Sorry but cPanel makes that answer that question. Look at host name. Will get back to you. Let me know if I can be of further help." etc. Coupled with my reading comprehension skills it's a three-ring circus.
     
    #5 Kerrith, Nov 17, 2006
    Last edited: Nov 17, 2006
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If you already have a database working on one forum, edit the config.php (not sure what it's called in phpbb its been so long since I messed with one) Edit the config.php in the OTHER forum to show the same details in config.php as the first. The database name, password and username. If these are the same, both forums will use the same database.

    I don't have much. :p
    But that earlier post should be all you need. It may not make sense today for you, but it will.

    The files for the forum are just files. The database is the important stuff. The config.php ties the two together.
     
  7. Kerrith

    Kerrith Member

    Joined:
    Nov 7, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Thank you again.

    Via FTP I deleted /forum/ and /forums/ and pressed refresh.

    Via cPanel > MySQL I "Checked" and "Repaired" phpbb_mydb. (Neither activity showed anything wrong)

    I then did a clean install of phpBB2.0.21 into a directory named /forums/
    I changed the permissions of config.php to 666.

    I then ran mydomain.org/forums/install/install.php

    Entered:
    DB Name = phpbb_mydb
    DB Username: phpbb_myusername
    DB PW: mypassword
    and got"

    "...Table 'phpbb_auth_access' already exists" again.

    It appears there's something I have to release or reset in MySQL so as to reset the auth access.

    Any idea what I need to do?

    So close,

    Kerry
     
    #7 Kerrith, Nov 18, 2006
    Last edited: Nov 18, 2006
Loading...

Share This Page