spirog

hi i had one site i was using as a dev site i added the genders and now i have another site ( domain ) I installed phpfox on just wondering if there is a way to add back in those genders without having to type them all in again using the backup of sql database from the old site (domain) is this possible if so which files and or .sql files do I upload in phpmyadmin ? or how is this possible, the database does not have the same name 

 

example of old and new database names

old databse was named

rdrt_phpfox1

new database is named 

foxx_phpfox1

 

will this work to import some of those .sql files to get those genders to work on the new site (domain) ??

 

thanks if someone can explain which files i need to import in phpmyadmin or add to my site to make it work without ruining new install - site

 

Spiro

Be the first person to like this.
Jonathan Mitchell

If your trying to clone the new site from the dev site, just upload the old database then edit PF.Base/file/settings/server.sett.php

where it says  $_CONF['db']['name'] = 'your_db_name';

change whatever you have at "your_db_name" to the database you just uploaded.  

make sure you add a user, permissions and password to that database and they match the ones in that file too.

This is all assuming you have no members in either database

Last update on March 24, 2018 by Jonathan Mitchell.
Be the first person to like this.
spirog

hi Jonathon,

I installed phpfox on another domain,

I only had admin and another user added to the dev site, but i created 70 genders, so it tried to add database via backup and it didnt work it made my site 500 error. 

if I just upload the .sql files one by one i would have to edit each file seperately to fix to the new database name ? 

 

example of one of the .sql files in my backup below

------------------------------------------------------- ------------------------------------------------------- ------------------------------------------

-- MySQL dump 10.16  Distrib 10.2.13-MariaDB, for Linux (x86_64)

---- Host: localhost    Database: OLDdatabaseName_fox1 

i would change this in each file to New DB name_fox1 that i created in my new site ? then upload via phpadmin in my cpanel account ? 

-- ------------------------------------------------------

-- Server version 10.2.13-MariaDB-cll-lve

 

/*!40101 SET 

 

in cpanel i cannot create samename of old database cause the username in cpanel is different so if my username for domain was apple it creates apple_whateverinameDB

now i added another domain called peaches and my databse starts with peaches_whateverinameDB

so if i upload dev website database in each ,sql file it has old DB name apple_whateverinameDB

thanks Spiro

Last update on March 26, 2018 by spirog.
Be the first person to like this.
Jonathan Mitchell

you should be able to just upload the dev database , add a user and password to it, ...then make corrections in server.sett.php to point site to that database

Be the first person to like this.
spirog

is this where i would import old dev database >

Go to phpmyadmin > do not select a database > just click on import > then select database and import it >> then in server.settings.php change to new database which would be the name of old DB 

-- MySQL dump 10.16  Distrib 10.2.13-MariaDB, for Linux (x86_64)

---- Host: localhost    Database: OLDdatabaseName_fox1 

just not sure how to create user for this database name in cpanel or phpmyadmin with password to allow read write etc..

is this possible to view this import - DB name in cpanel if username is different ? 

sorry im still not getting it ? sorry for my confusion i dont want to have to reinstall again to new site, easy but just wasting time if I can get dev DB correct how to

 

Importing into the current server

File to import:

File may be compressed (gzip, bzip2, zip) or uncompressed.
A compressed file's name must end in .[format].[compression]. Example: .sql.zip

Browse your computer:(Max: 50MiB) 
You may also drag and drop a file on any page.

Last update on March 26, 2018 by spirog.
Be the first person to like this.
Jonathan Mitchell

what I would do is, first create a new database, add your database user to it with all permissions.

once created, click on the new database, then click Import on the menu on the right just above the tables.

If you dont select a database, it wont know where to import the tables to

Be the first person to like this.
Jonathan Mitchell

also, in server.set.php around line 33 you'll see

$_CONF['core.host'] = 'yoursite.url';

make sure this is correct with your sites url, such as mysite.com

yours is probably still showing the dev site url

Be the first person to like this.
spirog

Ok I think I'm getting it now. After I select new DB in phoadmin then  I go to import DB and import Dev DB then it will have old DB username ? And I could just change the username ? I'm server.sett.php or do I have to do something else. ??

Thank you for taking time to help me .

Be the first person to like this.
spirog

Actually what I did was installed a new fresh install of phpfox on a new domain .So it's all ready set to new domain and new database .Just the old database on a different domain is what I wanted to pull into new website. Just for the genders. Cause it took me over 2 hours to set them up .:)

Be the first person to like this.
Jonathan Mitchell

in myphpadmin , scroll down and you should see where you can add user to database, or create a user if you dont have one there yet. If you do have one already on that server, just add assign the user to the new database

Be the first person to like this.
Jonathan Mitchell

I'll be back on in a few hours if you still need help...its hard walking someone through the steps unless i'm actually doing it.lol

Be the first person to like this.
spirog

Hey thanks allot for the help. I couldn't figure out exactly how you were telling me .My site kept going white page .and would not connect to database .son eventually what I did was made a funny test database and inported the old Dev site DB then went into gender and copy n pasted the genders in the new domains DB. And deleted the language phrase DB in new one and imported the old DB of language phrases cleared cache and it worked .lol lol I must be a dummy but I could not for the life of me figure it out your way. 

I also tried fresh install downloading backup app and renaming the old file of backup and tried restore .then I saw some of the home page but it was not connecting to DB I changed domain name and DB name etc  but still no luck so finally hours later I figured out another way to make genders show up now. Whew .That was ridiculously a Brian teaser. But I got it. 

 

Thank you so so much for all your help. If I could only say I could help you in anyway. I would but your a pro. The only way I could repay you is if you needed some space on my server to have a Dev site I would be more than happy to allow it. :) 

Sincerely,

Spiro G

Be the first person to like this.
Jonathan Mitchell

its no problem. I just like to help when I can. Not a pro by any stretch of the meaning. I've just went through the same problems you had a few times. Its just hard trying to explain something when you cant tell what the other person is doing or looking at. lol