• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1268
  • Last Modified:

WAMP Server (MYSQL) Front login.

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
NeoAshura
Asked:
NeoAshura
  • 2
  • 2
  • 2
3 Solutions
 
Lukasz ChmielewskiCommented:
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
 
mayankagarwalCommented:
0
 
Lukasz ChmielewskiCommented:
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

 
mayankagarwalCommented:
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
 
NeoAshuraAuthor Commented:
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
 
NeoAshuraAuthor Commented:
worked, all valid comments equal points.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now