Jump to content

Set Up my Database with no UID or password


Butterbean

Recommended Posts

When I set up MS SQL on my machine, for whatever reason I did not set up a UID or password.  I can not get the php to connect with SQL because I do not have a UID and password on the db (which I know is not smart).  I don't understand code enough to know how to manipulate this string below to remove the requirement.  
 
Ultimately, the other approach would be to go back and add a Username and Password to the MS SQL Db but that seems to be a feat also.  Any help getting past this small hurdle would be appreciated.
 
It is set up as a db engine.
 
$serverName = "BASEMENT\SQLEXPRESS"; //serverName\instanceName
$connectionInfo = array( "Database"=>"aaaaaaa", "UID"=>"bb", "PWD"=>"cccccccc");
$conn = sqlsrv_connect( $serverName, $connectionInfo);

Thank you in advance.

 

Link to comment
Share on other sites

  • 2 weeks later...

If I knew at the time how to fix the account, I wouldn't be in here getting reprimanded by someone that obviously doesn't know the answer to the question and wouldn't provide an answer if he did!!!  So, if you have nothing better to say, move along and mind your business please.  Thank you. Check yourself at the door! 

Link to comment
Share on other sites

I figured it out.  There was a bug with MSSQL2008R2 that prevented it.  No matter how many times I tried to uninstall and reinstall it, it never created a database.  This was easily fixed by downloading 2014.  The PHP was written with a login and password and connected to my work db.  When I tried to set up a home instance, for development, I couldnt get it work with having the pw's set up.  The work around was to just remove the username and password from the code, but I couldnt never figure out how. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.