SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 52
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Location
    Dublin, Ireland.
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    #1045 - Access denied for user 'root'@'localhost' (using password: NO)

    Hi all.
    Not long at this. Yesterday I uninstalled wamp5 and installed latest wamp2. I entered password in sql console which it now accepts each time I log on to sql console. However when I try to access mysqladmin it returns:
    #1045 - Access denied for user 'root'@'localhost' (using password: NO)
    Any help much appreciated.
    Thanks and kind regards,
    Dermot.

  2. #2
    SitePoint Guru Ruben K.'s Avatar
    Join Date
    Jun 2005
    Location
    Alkmaar, The Netherlands
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't want to state the obvious but

    the login mysqladmin uses is wrong. it appears mysqladmin logs in using username 'root' and password '' (blank)


  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Location
    Dublin, Ireland.
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks Ruben.
    When I first installed wamp2 I could access phpmyadmin. But once I created password in mysql console as it suggested I should for security reasons then phpmyadmin immediately hit me with above error.
    Do I need to reconfigure something somewhere?
    If so what and where?
    Sorry for being so slow.
    Kind regards,
    Dermot.

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    you have to specify the password in the config.inc.php file for phpmyadmin.

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Location
    Dublin, Ireland.
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks fellas.
    Thanks to you things are swimming again and everything is rosy.
    And Longneck I've left a pint of Guinness for you at the bar!

    For any other fellow newbies here is the whole fix:-
    mysql>UPDATE mysql.user
    ->SET Password=PASSWORD("*******")
    ->WHERE User="root";
    mysql>FLUSH PRIVILEGES;

    This is from Sitepoint's "Build your own Database Driven Website using PHP and MYSQL"

    And then as Longneck said specify the password in the config.inc.php file for phpmyadmin.

    Kind regards,
    Dermot.

  6. #6
    SitePoint Addict bbparis's Avatar
    Join Date
    Aug 2008
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm just to confirm you that it's the solution.

    yesterday I tried to fix the problem, but the only think that was missing is the first line in MySQL command:

    UPDATE mysql.user

    I was writing ( UPDATE mysql ) : so please follow the next steps if you want to resolve your problem with ( #1045 - Access denied for user 'root'@'localhost' (using password: NO):

    1 : go to your WAMP icon on your PC desktop screen and LEFT CLICK to open the menu, you will see MYSQL folder, CLICK to see MYSQL CONSOLE, open it.

    2: now you have DOS screen ( a black screen ) :

    A: if you already set a password, type it
    B: if you did not do this step yet, write the following red text
    B1: use mysql; and click ENTER on your keyboard
    3: now write the following red text and click ENTER :

    UPDATE mysql.user
    ->SET Password=PASSWORD("*******")
    ->WHERE User="root";

    don't worry about this sign ( -> ) , because for example when you write ( UPDATE mysql.user ) and you click ENTER on your keyboard, a new line appear with this sign ( -> ), your command will execute when you write this sign ( ; ) at the end of your text and click ENTER.

    NOTE: replace the password ******* by your password.

    4: now write the following red text and click ENTER :

    FLUSH PRIVILEGES;

    5: and to exit the black DOS screen now, write exit and click enter.

    ------------------------- we are finished from MySQL now --------------

    6: go to WAMP folder ( open your My Computer, click on C driver, and you will see WAMP folder ), click on APPS folder, and than click on your PHPMYADMIN folder ( e.g my folder called phpmyadmin2.11.6 ) and find the config.inc.php

    7: open config.inc.php and find the following orange text:

    $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed

    and add your password now that you used in step number 3 like that :

    [COLOR="rgb(255, 140, 0)"]$cfg['Servers'][$i]['password'] = 'yourpasswordhere'; // MySQL password (only needed[/COLOR]

    8: now save this modification, and close config.inc.php

    9: go to your web browser and type the following link :

    http://localhost/phpmyadmin/

    and enjoy, this is what happened with me.

    NB: I wrote all this explications, because I'm also learning PHP and I found a lot on this website helped me, so I'm trying also to help you.

  7. #7
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for me the error still show up guys help....

    this part
    $cfg['Servers'][$i]['AllowNoPasswordRoot'] = false;

    was set to true instead of false and was cuasing the error
    on the config.inc.php

  8. #8
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I still have same error and I entered password into the config file like I have read all over is there anything else to do?

  9. #9
    SitePoint Addict bbparis's Avatar
    Join Date
    Aug 2008
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, you are welcome giorgiok.

    Hello Taralee02, please can you repeat the steps above, when you enter the following text :
    UPDATE mysql.user
    ->SET Password=PASSWORD("*******")
    ->WHERE User="root";

    make sure to write your password ( your password should replace the stars ) example:
    if your password is ( apple ) than you have to write the command like that :

    UPDATE mysql.user
    ->SET Password=PASSWORD("apple")
    ->WHERE User="root";

    and after that don't forget ( FLUSH PRIVILEGES; ) command ( step number 4 )

    now number 7 is very important, please repeat the steps and try again, and don't forget number 7, I'm waiting you.

  10. #10
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! Ya I saw somewhere about deleting temp files and cookies so I did that and it seemed to work once and then when I tried to get back in I just got a white page that said done. Sometimes it will say it can't be displayed when I go to localhost. Before though my wamp was yellow and I don't think it was connecting to mysql. Now it goes all the way over and it is black. I am new to this. I just installed this 3 days ago. I was referred to try jumla because it is suppose to be easy to use and you don't have to know much coding. I was taught to use dreamweaver and coding is usually hard for me. I thought I would try it out. :-D I just tried it again now and it did let me into my phpmyadmin. I don't know if it will let me back though. I will close it and try again....Do you know why it would go to a white page and say blank though? I just wait a while or mess with my IE (internet explorer) settings and it seems to work again. Maybe it's IE? Thanks again for the help!!!

  11. #11
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya I closed it and tried it again and now it is a white page again and says done. I don't understand that. :-( I will try firefox. :-D

  12. #12
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a blog with all the issues I was having on it, but I can't post it since I am new to the forum. I am going to just copy and paste my issues. Sorry....I know most of it doesn't matter anymore since I am not having the issue, but maybe it would be helpful information. I am also sorry for so many replies. I kept thinking of things to say. Thanks!

    taraleedesignsblog
    blogspot
    com....I can't post links, so I figure you can assume what this is maybe....sorry :-S....just when I hit enter from taraleedesignsblog to com put a dot between them haha thanks! Sorry ohhh and I tried it in firefox and it works everytime, so it must be something with IE....So I got it working!!!

    SQL Errors
    I am unsuccesfull logging into sql database when trying to instal. The installation fails on the security. It says I may have a firewall blocking it. I turned it off and still no luck and my phpmyadmin will not login. Althought it logged in one time after I first installed it. Here is my error. If you have any information on how I could fix this issue, it would be greatly appreciated.

    phpmyadmin error:

    Error Number 1045.
    Access denied for user 'root'@'localhost' (using password:NO)

    SQL installation error:

    MySQL Server Instance Configuration Wizard
    MySQL Server Instance Configuration
    Configure the MySQL Server 4.1 server instance.
    Processing configuration...

    / Prepare configuration
    / Write configuration file (c:\Program ... \my.ini)
    / Start service
    x Apply Security settings

    The security settings could not be applied.

    This is what happens when I try password fix:

    After the configuration wizard locks up by giving me error:1045, I start the MySQL command
    line client and press ENTER when asked for a password, but the command line client exits
    on me.

    Now getting a white page on phpmyadmin that just says done and the wizzard says service can not be started on the restart service step

    Now getting...#1045 - Access denied for user 'root'@'localhost' (using password: YES)

  13. #13
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry I have a new question.......

    I was able to get into this page.....localhost/administrator/ It was to get into this joomla that I was told about, but now that doesn't work, but it did before I messed with any settings to get phpmyadmin to work. Which doesn't make sense to me because the config file is in the phpmyadmin folder which is in a different folder. It is all in the wamp folder, but ok.....here is what I mean.

    Path for admin folder:

    C:\wamp\www

    Path for phpmyadmin config file:

    C:\wamp\apps\phpmyadmin3.2.0.1

    The error it gives me when I try to go to localhost/administrator/ is.... Database Error: Unable to connect to the database:Could not connect to MySQL

    Do you know how I could fix this? It used to ask me for my login and I would enter it and I was in, but now it doesn't. :-( Thanks for any info!

  14. #14
    SitePoint Addict bbparis's Avatar
    Join Date
    Aug 2008
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello, I read your posts from my iPhone, I will send your my reply with some solutions from office during the day, can you please tell me which version of php you have ?

  15. #15
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php 5.3.0

    I think I messed it up....I was trying to figure out why I could not get into joomla admin page now getting the database error and was messing with my phpmyadmin priviliages and i change some but then I clicked something to set them back to the defaults and now I can't get into phpmyadmin again... :-( It's ok no hurry. It jus frustrating, but I am sure I will get it! Thanks so much!

    I am getting this error now for my phpmyadmin:

    #1045 - Access denied for user 'root'@'localhost' (using password: YES)

    and for my localhost/adminitrator I get:

    Database Error: Unable to connect to the database:Could not connect to MySQL

    Thanks again!

  16. #16
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    my config.inc for phpmyadmin:
    -this is how it was when it was working earlier

    <?php

    /* Servers configuration */
    $i = 0;

    /* Server: localhost [1] */
    $i++;
    $cfg['Servers'][$i]['verbose'] = 'localhost';
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['port'] = '3307';//I had changed it I think when I set it up I can change it back to 3306. I don't think its making a difference for me anyway.
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'mypassword';
    $cfg['Servers'][$i]['AllowNoPassword'] = false;

    /* End of servers configuration */

    $cfg['DefaultLang'] = 'en-utf-8';
    $cfg['ServerDefault'] = 1;
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';

    ?>

  17. #17
    SitePoint Addict bbparis's Avatar
    Join Date
    Aug 2008
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok

    first of all try to do that :

    1) go to php website and downalod php version 5.2.9, install on your PC and when you finish.

    2) go to the small WAMP icon on your PC screen ( right below ) and select PHP >> Version, you will find 2 versions, select version 5.2.9

    waiting your replay

  18. #18
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok that took me a bit to get because it didn't like it at first....it was...when I chose the 5.2.9, I got a window that says apache closes because it had a problem and then wamp puts itself back to the 5.3, but now it stayed. :-) I have same error. :-(





    I am not sure if image upload will work, but I am trying. :-)

  19. #19
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok...they didn't oh well ok my error is....

    MySQL said:

    #1045 - Access denied for user 'root'@'localhost' (using password: YES)
    phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

    and go see images I was trying to upload if would like.....

    http://taraleedesignsblog.blogspot.c...in-errors.html

  20. #20
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by bbparis View Post
    I'm just to confirm you that it's the solution.

    yesterday I tried to fix the problem, but the only think that was missing is the first line in MySQL command:

    UPDATE mysql.user

    I was writing ( UPDATE mysql ) : so please follow the next steps if you want to resolve your problem with ( #1045 - Access denied for user 'root'@'localhost' (using password: NO):

    1 : go to your WAMP icon on your PC desktop screen and LEFT CLICK to open the menu, you will see MYSQL folder, CLICK to see MYSQL CONSOLE, open it.

    2: now you have DOS screen ( a black screen ) :

    A: if you already set a password, type it
    B: if you did not do this step yet, write the following red text
    B1: use mysql; and click ENTER on your keyboard
    3: now write the following red text and click ENTER :

    UPDATE mysql.user
    ->SET Password=PASSWORD("*******")
    ->WHERE User="root";

    don't worry about this sign ( -> ) , because for example when you write ( UPDATE mysql.user ) and you click ENTER on your keyboard, a new line appear with this sign ( -> ), your command will execute when you write this sign ( ; ) at the end of your text and click ENTER.

    NOTE: replace the password ******* by your password.

    4: now write the following red text and click ENTER :

    FLUSH PRIVILEGES;

    5: and to exit the black DOS screen now, write exit and click enter.

    ------------------------- we are finished from MySQL now --------------

    6: go to WAMP folder ( open your My Computer, click on C driver, and you will see WAMP folder ), click on APPS folder, and than click on your PHPMYADMIN folder ( e.g my folder called phpmyadmin2.11.6 ) and find the config.inc.php

    7: open config.inc.php and find the following orange text:

    $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed

    and add your password now that you used in step number 3 like that :

    [COLOR="rgb(255, 140, 0)"]$cfg['Servers'][$i]['password'] = 'yourpasswordhere'; // MySQL password (only needed[/COLOR]

    8: now save this modification, and close config.inc.php

    9: go to your web browser and type the following link :

    and enjoy, this is what happened with me.

    NB: I wrote all this explications, because I'm also learning PHP and I found a lot on this website helped me, so I'm trying also to help you.
    Hi bbparis,

    Thank u very much for ur post at (sitepoint on Aug 2008) regarding PHPMyadmin problem.
    I have problem with PHPMyadmin (Wamp). Though i tried a lot from others suggestions,
    but it wasn't fixed my problem.
    I tried ur solution. It works.
    Though im not at all registered user in it. So I registered myself to say thanks to u.
    Im very grateful to ur valueable & detailed suggestion.

    Once again thanks a lot.
    Shall i ask u, if i got any other doubt in PHP?

    Regards,
    Vanash

  21. #21
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another one registering to say thank you bbparis for the detailed instructions.

    As for wamp documentation am I right in assuming that there isn't really any apart from installation instructions perhaps due to the fact that it's really only a starting point for other applications/services and you need to find documents for them at other places?

  22. #22
    SitePoint Addict bbparis's Avatar
    Join Date
    Aug 2008
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear Vanash, I'm happy to read that you could resolve your problem, you are welcome.
    Dear PunchCardBoy, nice to know that you resolved your problem too, and try to ask any question in this forum, because there are a lot of nice people here are ready to help other.

    Best regards.
    BB

  23. #23
    SitePoint Member
    Join Date
    May 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can anyone tell me MySQL console show me edit password, but i do not know it. Again and again #1045 - Access denied for user 'root'@'localhost' (using password: NO) I did all you said here.

  24. #24
    SitePoint Member
    Join Date
    May 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi lidelu you can try to folow what astroja posted, go to were your wamp is stored and open the folder writen wamp usually in the c: hard drive and then when you open it you can then find a folder called apps inside the wamp folder. after oppening the apps folder. look and open config.inc.php and find the following text:

    $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed) then enter your password between quotes after the equal sign. pliz take care not to delete anything just add the password you used on installing the wamp server, enter it between the quotes an example is $cfg['Servers'][$i]['password'] = '*******'; after entering your password save the changes you have made and then close all the folders you have opened then restart your wamp and try to open the phpmyadmin again in wamp, your problem will be solved.

  25. #25
    SitePoint Member
    Join Date
    May 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi I am a PHP novice here. I have the same problem as well. On your step 2. I suppose to have a blank screen (DOS), I didn't have a blank screen. I have this line, enter your password. What password is it asking here?
    I don't have a password for my user account and the PHPmyAdmin installation. So I am puzzled here.



    Quote Originally Posted by bbparis View Post
    I'm just to confirm you that it's the solution.

    yesterday I tried to fix the problem, but the only think that was missing is the first line in MySQL command:

    UPDATE mysql.user

    I was writing ( UPDATE mysql ) : so please follow the next steps if you want to resolve your problem with ( #1045 - Access denied for user 'root'@'localhost' (using password: NO):

    1 : go to your WAMP icon on your PC desktop screen and LEFT CLICK to open the menu, you will see MYSQL folder, CLICK to see MYSQL CONSOLE, open it.

    2: now you have DOS screen ( a black screen ) :

    A: if you already set a password, type it
    B: if you did not do this step yet, write the following red text
    B1: use mysql; and click ENTER on your keyboard
    3: now write the following red text and click ENTER :

    UPDATE mysql.user
    ->SET Password=PASSWORD("*******")
    ->WHERE User="root";

    don't worry about this sign ( -> ) , because for example when you write ( UPDATE mysql.user ) and you click ENTER on your keyboard, a new line appear with this sign ( -> ), your command will execute when you write this sign ( ; ) at the end of your text and click ENTER.

    NOTE: replace the password ******* by your password.

    4: now write the following red text and click ENTER :

    FLUSH PRIVILEGES;

    5: and to exit the black DOS screen now, write exit and click enter.

    ------------------------- we are finished from MySQL now --------------

    6: go to WAMP folder ( open your My Computer, click on C driver, and you will see WAMP folder ), click on APPS folder, and than click on your PHPMYADMIN folder ( e.g my folder called phpmyadmin2.11.6 ) and find the config.inc.php

    7: open config.inc.php and find the following orange text:

    $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed

    and add your password now that you used in step number 3 like that :

    [COLOR="rgb(255, 140, 0)"]$cfg['Servers'][$i]['password'] = 'yourpasswordhere'; // MySQL password (only needed[/COLOR]

    8: now save this modification, and close config.inc.php

    9: go to your web browser and type the following link :

    http://localhost/phpmyadmin/

    and enjoy, this is what happened with me.

    NB: I wrote all this explications, because I'm also learning PHP and I found a lot on this website helped me, so I'm trying also to help you.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •