Main | Search | Courses | Login
 
 
 
Course Page

 
PHP
Title : Creating MySQL Databases with PHP    Author : Daniel Demola    Date : 2012-10-01 21:17:22    No. : 1
You can if you wish, actually create your databases with PHP rather than using MySQL client tool. This practice has potential advantages-you can use an attractive front end that may appeal to those who find the MySQL command-line client horribly plain or finicky to use-counterbalanced by one big disadvantage, which is security.

To create a database from PHP, the user of your scripts will need to have full CREATE/DROP priveleges on MySQL. That means anyone who can get hold of your scripts can potentially blow away all your databases and their contents with the greatest of ease. This is not such a great idea from a security standpoint.

If you are even considering creating databases with PHP, do yourself a big favour and at least don't store the database username and password in a text file. Make yourself type your database username and password into a form and pass the variables to the inserting handler each and every time you use this script. This is one case where keeping the variables in an include files outside your web tree is not sufficient precaution. Better yet, run the scripts manually from the command line through SSH:
mysql-u -p



Message was edited at 2012-10-01 21:10:17 By Demola
Title : Error    Author : Daniel Demola    Date : 2012-10-01 21:19:58    No. : 1
what's happening? My codes are not showing in this post..why?

 
  Help | Terms | Privacy Statement | About | Report Software Bugs | Society50 Asian Social Network | CupidB Free Matchmaker