Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Mysql Database... A Simple Question... I Hope



1 reply to this topic

#1 OliviaT

    Newbie

  • Kontributors
  • Pip
  • 0 posts

Posted 16 May 2011 - 07:58 PM

I want to create a simple database on my computer to help develop a help form--but am stuck at a fundamental MySQL issue. I am using XAMPP to begin with and want to say the following:

$connection=mysql_connect("localhost","",""); //yes, I want to work in a password and username free environment... I know the dangers
mysql_select_db("help",$connection); //help is the name of my database, help_issue is the name of my table in the help database

$query="UPDATE help_issue SET ID='NULL' First='$firstname' Last='$lastname' Badge='$badge' Phone='$phone' Email='$email' ComputerName='$computername' ComputerLocation='$computerlocation' Location='$location' Involves='$involves' Priority='$priority' Comments1='$comments' Comments2='$comments2' Assigned='$assigned' ";
mysql_query($query);

Is it possible to create a connection without a user and password? If not--how do I set one up in XAMPP? Any help would be greatly appreciated... I feel like beating my head into the wall at this point...

#2 xpress

    XPRESSing the XPRESSion

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 709 posts
  • Gender:Male
  • Location:X Universe
  • Interests:Computer Security
    Java and PHP
    Music
  • myCENT:93.53
  • Spam Patrol

Posted 17 May 2011 - 04:33 PM

View PostOliviaT, on 16 May 2011 - 07:58 PM, said:

Is it possible to create a connection without a user and password? If not--how do I set one up in XAMPP? Any help would be greatly appreciated... I feel like beating my head into the wall at this point...

No, it is not possible to create a connection without a username(as far as I know and my experience with databases concerned). But you can leave a password blank.
The default user for MySql database is root and password is blank (means no password).

So, if you have already created a database with the name help, then create a connection using root as username and password is empty string.

Ask me if you have any other doubts.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users