Solved

WAMP Server (MYSQL) Front login.

Posted on 2011-03-08
6
1,182 Views
Last Modified: 2012-05-11
How would i get wamp to display a login to the database? at the minuite you can load it directly from localhost but does not have a login.. obviously i want this for security reasons when it goes live, if this something you do now or when it goes live? and if so how do i do it??

Also what is the standard connection for PHP files regarding wamp

obviously the server name is localhost but what is the default password?

many thanks for your time.

james
0
Comment
Question by:NeoAshura
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Assisted Solution

by:Lukasz Chmielewski
Lukasz Chmielewski earned 334 total points
ID: 35068860
I do not know WAMP, but in XAMPP the default password for the root user is empty, you have to configure it manually by editing the XAMPP configuration file.
0
 
LVL 5

Assisted Solution

by:mayankagarwal
mayankagarwal earned 166 total points
ID: 35068867
0
 
LVL 27

Accepted Solution

by:
Lukasz Chmielewski earned 334 total points
ID: 35068872
The online version of the database will have another login and another password, which you would have to provide through the php script connecting to mysql (with mysql_connect() function)
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 5

Expert Comment

by:mayankagarwal
ID: 35068885
no doubt that the online databse will have the user name and password.
But if you are going to launch this solution on your own server in that case you have to change the password.
0
 
LVL 6

Author Comment

by:NeoAshura
ID: 35069137
thanks ill try using the following...

<?php
//error_reporting(E_ALL);
// CONNECTION AND SELECTION VARIABLES FOR THE DATABASE
$db_host = "localhost";
$db_name = "DATABASENAME HERE";        
$db_user = "root";
$db_word = "";

// OPEN A CONNECTION TO THE DATA BASE SERVER
if (!$db_connection = mysql_connect("$db_host", "$db_user", "$db_word"))
{
   $errmsg = mysql_errno() . ' ' . mysql_error();
   echo "<br/>NO DB CONNECTION: ";
   echo "<br/> $errmsg <br/>";
}

if (!$db_sel = mysql_select_db($db_name, $db_connection))
{
   $errmsg = mysql_errno() . ' ' . mysql_error();
   echo "<br/>NO DB SELECTION: ";
   echo "<br/> $errmsg <br/>";
   die('NO DATA BASE');
}
// IF WE GOT THIS FAR WE CAN DO QUERIES


?>
0
 
LVL 6

Author Comment

by:NeoAshura
ID: 35069438
worked, all valid comments equal points.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question