logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: BBS page & Mysql database on local computer
Author
ranger



Joined: 01 Nov 2011
Posts: 11

PostPosted: Thu 03 Nov '11 10:40    Post subject: BBS page & Mysql database on local computer Reply with quote

I have a website and I just created a BBS section; I'm quite new to this.
The top page in the .../bbs directory is "index.php".
The database is created and everything is working fine.
I have the same structure on my windows computer; apache, php, mysql are installed; database is not yet created.

What I want is to be able to see the index.php file on my computer like it is on my site; after editing the html/php code (changing the design, etc) I will ftp transfer it to the site.

In order to do this, I need a database to which the script on my local pc connects, otherwise I cannot see the page normally, as it is online.

So I think there are 2 options:
1. create a database on my own pc, similar with the one online.
2. let the script connect to the online database and work online.

My questions are:
- Which practise is most popular among pros from the two above? I guess each has its advantages and disadvantages.

- In case I choose to work with a local database on my PC, how can I instruct mysql to create the database in the directory that I want instead of the default location (which I don't know where it is anyway)? For example, in this case I want the path to be .../bbs/database

- If I have more local sites on my pc, each with its own independent BBS, is it possible to have a different location of the respective databases for each site?
(meaning, would mysql work with databases in different directories?)

I would like the databases to be inside the bbs folders for convenience and ease of work.

- Is it OK to use phpmyadmin for creating a local database such as the one mentioned above (tables,etc are created by the installation.php script file of the bbs)

Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 03 Nov '11 18:16    Post subject: Re: BBS page & Mysql database on local computer Reply with quote

ranger wrote:

So I think there are 2 options:
1. create a database on my own pc, similar with the one online.
2. let the script connect to the online database and work online.

My questions are:
- Which practise is most popular among pros from the two above? I guess each has its advantages and disadvantages.

Most popular is ti test all stuff localy and than upload the completed webpage.

ranger wrote:

- In case I choose to work with a local database on my PC, how can I instruct mysql to create the database in the directory that I want instead of the default location (which I don't know where it is anyway)? For example, in this case I want the path to be .../bbs/database

Well mysql does not use flat files for storing data in it. mysql itself is a server like apache and sending the data over tcp/ip or a socket. So there is no need to let mysql create a db into that directory. Over the mysql connector which is build into php you can connect to the database.

ranger wrote:

- If I have more local sites on my pc, each with its own independent BBS, is it possible to have a different location of the respective databases for each site?
(meaning, would mysql work with databases in different directories?)

it makes sence to create different databases for each project / webpage. But you have to make sure that you can do that on your server on the internet,too. If not you should think of use prefixes or the table names.

ranger wrote:

I would like the databases to be inside the bbs folders for convenience and ease of work.

As I tried to explain above: mysql does not work this way.

ranger wrote:

- Is it OK to use phpmyadmin for creating a local database such as the one mentioned above (tables,etc are created by the installation.php script file of the bbs)

Sure, use phpmyadmin.
Back to top
ranger



Joined: 01 Nov 2011
Posts: 11

PostPosted: Fri 04 Nov '11 14:36    Post subject: Reply with quote

I see, OK, thanks a lot for the tips, I have a better understanding now.
Back to top


Reply to topic   Topic: BBS page & Mysql database on local computer View previous topic :: View next topic
Post new topic   Forum Index -> Other Software