PDA

View Full Version : Create New database linking to my localhost



TCHK
03-14-2009, 05:14 PM
Anyone knows how can I create a new database w/out the username in the front? I need to create a phpBB database for my website and links it to my localhost....

Thanks

Falcon1986
03-14-2009, 07:12 PM
AFAIK, any database created within your HostMonster account will have your cPanel username appended as a prefix to the database name.

What is wrong with having it this way?

anonymous
03-14-2009, 07:32 PM
What is wrong with having it this way?
...maybe he's trying to farm out his web work and he doesn't want
the person to try to brute force login to his hostmonster account????

Falcon1986
03-14-2009, 09:38 PM
...maybe he's trying to farm out his web work and he doesn't want
the person to try to brute force login to his hostmonster account????

By this, do you mean being able to view/download the configuration file containing the database username/password information?

I suppose that is understandable. But even if an intruder were to gain access to this file, they would only be able to access the database username and password, no? Assuming that you do the wise thing and use a completely different and secure password for your cPanel login, I don't see how they could easily get much further than the username.

Furthermore, such configuration files can be protected. In WordPress, for example, database username and password information is stored in the wp-config.php file. Although this file should not be easily viewable in the first place (trying to do so just spits out garbled text), you can forbid direct access with an .htaccess statement:


<Files wp-config.php>
Order Deny,Allow
Deny from All
</Files>

This can also be applied to other files. I also do this for some other files that I do not want easily viewable, which may be overkill since Apache should return a 403 Permission Denied for such sensitive files.


#For php.ini
<Files php.ini>
deny from all
</Files>

#For fastphp.ini
<Files fastphp.ini>
deny from all
</Files>

#For .htaccess
<Files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
</Files>

#For error logs
<Files error_log>
Order allow,deny
Deny from all
Satisfy All
</Files>