/    Sign up×
Community /Pin to ProfileBookmark

storing MySQL in Bin Folder

When creating dynamic web pages with PHP and MySQL do you have to place the MySQL files into the bin folder? or can you just place them into any folder?

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@shimonSep 13.2004 — Could you possibly clarify what you mean by 'MySQL files' - it isn't entirely obvious from your post.
Copy linkTweet thisAlerts:
@dennicauthorSep 13.2004 — filename.sql
Copy linkTweet thisAlerts:
@solavarSep 13.2004 — You can store your .sql files anywhere you like. Bear in mind that they are not actually used directly by the MySQL db system.

You create them when you make a dump of your tables or whole database.

You use them when you restore the tables or database.

Because of their importance and sensitivity, you'll want to store them either outside the web path or in a password protected folder.
Copy linkTweet thisAlerts:
@dennicauthorSep 13.2004 — when you say 'you create them when you make a dump of your tables' do you mean when you actually insert records into the database?
Copy linkTweet thisAlerts:
@solavarSep 13.2004 — Sorry about the language.

In SQL-speak, to make a dump is to copy.

...and by the way, to drop is to delete. (Be warned).

When you use PHP dynamically, you connect to the MySQL database on the fly. You can create tables, insert data into those tables, delete the contents, etc, etc.

Your php files will allow users to sign up, login, etc. All this is handled behind the scenes.

However, there are times when you'll want to go to your MySQL database and make a physical copy of the entire database, for example.

To do this sort of thing, you would use an administrative tool like PHPMyAdmin. This tool, and others like it, will create a copy of the entire database as a text file with a .sql extension.

The copy is the 'dump'.
Copy linkTweet thisAlerts:
@dennicauthorSep 13.2004 — where do you get phpAdmin from?

and also when you dump a file how do you specify a path, say if i have a php file and the sql file (which is the actual database with the tables inside )in the same folder??

hope this makes sense, all new to me
Copy linkTweet thisAlerts:
@solavarSep 13.2004 — For phpmyadmin, have a look at:

http://www.phpmyadmin.net/home_page/

When you create a dump, you will be prompted for the location, it is just the same as when you try to save a Word document. You are asked where you want to save it.

I'm not sure if you're from a MSAccess background. Most people from that background, like me, start of by thinking of a MySQL database in the same way as an MDB database in MSAccess.

A MySQL database is an entire folder of files which is under the control of the MySQL engine. It is actually not one file, like an Access MDB.

Well, things will get clearer as you write your scripts to talk to MySQL.
×

Success!

Help @dennic spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...