15 replies
I imported a data base and then tried to get in the admin and this is the message I got. "Access denied for user 'blank'@'localhost' (using password: NO)" Can someone tell me what I might need to do to fix the problem.

I changed everything that the directions that came with the script said to change in the dconn.php file, which was just the db name and password. I know very little about working with data bases, so I hope it is something simple.

Thanks
Clint
#import
  • Profile picture of the author Earnie Boyd
    I understand the meaning of the message but you've not given enough detail on how you are accessing the DB. The message is saying that no password was given for DB user 'blank'@'localhost' and that is not allowed. I have no idea what dconn.php is or what software you are using. If you give us a clue as to what provided the dconn.php script maybe we can help better.
    Signature
    {{ DiscussionBoard.errors[5964260].message }}
  • Profile picture of the author xrampage16
    What might be more helpful is if you could supply us the information you used to import the data into the database?
    For instance, if you did it via command line, then it was most likely...
    mysql -uusername -ppassword -hlocalhost database_name < filename.dump
    if that's the case, then you should be able to connect to the database via...

    mysql -uusername -ppassword -hlocalhost

    If you were able to import, then you should have been able to log into the database.

    Are you trying to connect via phpmyadmin, or commandline? If you are trying to connect via phpmyadmin, most likely you will need the root login/password, which is generally set in the configuration file.
    Signature

    Developer and Admin for Komputer King LLC hosting - Offering lightning fast web hosting and Quality Backlink Building

    {{ DiscussionBoard.errors[5968512].message }}
  • Profile picture of the author Webgeniuz1
    Your configuration is incorrect.

    Download the dconn.php file. In there you'll see a set of credentials that you've used to import the database.

    It'll look something like this:

    Database Name
    Database Username
    Database Password

    Fill in these credentials with the information you've used to create your "Database" from before you've imported.

    Save that file and then re-import it. That should do the trick!

    Let me know if you need any help.

    Mike
    Signature
    Find what you love and pursue it! You'll be much more successful if you truly enjoy your work!
    {{ DiscussionBoard.errors[5968632].message }}
    • Profile picture of the author clint48
      xrampage16, I used phpmyadmin

      Mike, I tried to do what you said and I got this error.

      MySQL said: Documentation
      #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php
      // THIS IS THE AREA YOU EDIT

      $db_user = 'clintpol_traffic'' at line 1

      Thanks
      Clint
      {{ DiscussionBoard.errors[5970600].message }}
  • Profile picture of the author xrampage16
    Clint - Are you having problems logging into phpmyadmin?
    Signature

    Developer and Admin for Komputer King LLC hosting - Offering lightning fast web hosting and Quality Backlink Building

    {{ DiscussionBoard.errors[5972668].message }}
    • Profile picture of the author clint48
      No, i can get into phpmyadmin. I didn't have any trouble importing in phpmyadmin, I thought everything went fine until I tried to get the admin back office to open.

      In the directions it said to enter your db username and password in the dconn.php files. there are two dconn.php files one in the root and one in the admin folder.

      I entered db name, username, db password and local host. I looked in some of the other files to see if there was anywhere else to add my db info and I did find one other place called dbconnect.php, so I added it there, but I didn't add it there until I had already tried to get my admin back office up.

      I think I did everything in the directions correct, I really can't understand why I can't get my admin to work. It is a traffic exchange script and I am able to get the index.php page to load, but there is nothing on that page that will let me get into the admin back office.

      Thanks
      Clint
      {{ DiscussionBoard.errors[5974779].message }}
  • Profile picture of the author merlot105
    You need to set permissions for your DB/tables. I don't know what operating system you are using but if you are using a mac, open up "Terminal" and find your mysql installation, enter, and then type these two lines:

    GRANT ALL PRIVILEGES ON *.* TO 'blank'@'localhost'
    SET PASSWORD FOR 'blank'@'localhost' = PASSWORD('password');
    {{ DiscussionBoard.errors[5975094].message }}
    • Profile picture of the author Earnie Boyd
      Originally Posted by merlot105 View Post

      You need to set permissions for your DB/tables. I don't know what operating system you are using but if you are using a mac, open up "Terminal" and find your mysql installation, enter, and then type these two lines:

      GRANT ALL PRIVILEGES ON *.* TO 'blank'@'localhost'
      SET PASSWORD FOR 'blank'@'localhost' = PASSWORD('password');
      This can be done via phpMyAdmin as well. Look at the "Privileges" tab.
      Signature
      {{ DiscussionBoard.errors[5975709].message }}
      • Profile picture of the author clint48
        I granted all privileges with phpMy/Admin, I am using Vista.

        Thank you
        Clint
        {{ DiscussionBoard.errors[5976846].message }}
        • Profile picture of the author Earnie Boyd
          Originally Posted by clint48 View Post

          I granted all privileges with phpMy/Admin, I am using Vista.

          Thank you
          Clint
          Did that solve your problem?
          Signature
          {{ DiscussionBoard.errors[5981330].message }}
  • I think your problem is that you are trying to use a custom script that assumes you know how to fill in the username and password IN the script. Your database does not have a user named "blank" with no password with the right privileges to do whatever you're trying to do. So either you need to create this user named "blank" and give him the right permissions for modifying your database or you need to find someone that you can give more detail to so they can help you better.
    {{ DiscussionBoard.errors[5985115].message }}
    • Profile picture of the author clint48
      Earnie, I gave it all privileges when I first set it up, so it had all privileges from the start.

      Dennis, I used the exact user_name, db_Name and password in the script files that I used to set up my db. I have checked atleast 5 times to make sure I didn't make a mistake.

      I put a check in the all privileges box when I set up my db. The directions I had said to put my db info in two locations and that is where i put the db info. The files were dconn.php, one was in the root and the other was in the admin directory.

      The code I get suggest from what I understand, that I haven't entered the password in the script correct, but I have set the db up twice with a new password, but I still get the same code.

      Thanks for the help, but I don't think I will try and install it any more right now, I feel like I am trying to find a needle in a hay stack.

      Clint
      {{ DiscussionBoard.errors[5986807].message }}
  • Profile picture of the author codeinsects
    This problem is surely related to the db credentials you are using in your file. One error you said was related to syntax, something wrong in your mysql query.
    {{ DiscussionBoard.errors[5995173].message }}
  • Profile picture of the author WF99
    At last which solution worked for you ?
    {{ DiscussionBoard.errors[5995747].message }}
  • Profile picture of the author mopsyd
    Generally you should create a separate user for each site that accesses your database and only grant privileges to any relevant databases for that user. This way if your site is compromised somehow you will not leave your entire database vulnerable. In the PHP file you will need to give it the same username and password you created for it to login, but you can use this same login info for any number of php scripts (ideally supposing they are part of the same site). DO NOT USE YOUR ROOT PASSWORD EVER EVER EVER UNLESS YOU ARE IN A TESTING ENVIRONMENT LIKE XAAMP OR WAMP. If you downloaded or copied this script from somewhere, you will need to edit it in a plaintext editor to reflect your specific database login info. Do not use the login info included in the script, as you will want a secure password to connect to your database; make your own and update both the script and the database to reflect this.
    {{ DiscussionBoard.errors[6015845].message }}

Trending Topics