+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 34
Web Development Thread, 1045 - Access denied for user 'root'@'localhost' (using password: NO – phpmyadmin in Coding and Web Development; One other thing to bear in mind for the future is that MySQL security is more finely grained than (say) ...
  1. #16

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,158
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    One other thing to bear in mind for the future is that MySQL security is more finely grained than (say) Microsoft SQL Server.

    If you put the sa password in with MS SQL then you get in. With MySQL you can specify which machines a user can connect from (this can help to make it much more secure - even if a user knows the admin password they can't use it when they've hacked your webserver; they need to hack the db server as well)

    this can mean that a username and password which will work when you type them directly at the MySQL console won't work when they're in a PHP page running from a different web server.

  2. #17


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,703
    Thank Post
    352
    Thanked 806 Times in 721 Posts
    Rep Power
    348
    Quote Originally Posted by FN-Greatermanchester View Post
    i dont seem to have that file



    thanks but i have done that still no joy

    Thanks allot

    Z
    What files do you have in your phpmyadmin directory?

  3. #18

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,323
    Thank Post
    903
    Thanked 1,802 Times in 1,551 Posts
    Blog Entries
    12
    Rep Power
    467
    Quote Originally Posted by srochford View Post
    One other thing to bear in mind for the future is that MySQL security is more finely grained than (say) Microsoft SQL Server.

    If you put the sa password in with MS SQL then you get in. With MySQL you can specify which machines a user can connect from (this can help to make it much more secure - even if a user knows the admin password they can't use it when they've hacked your webserver; they need to hack the db server as well)

    this can mean that a username and password which will work when you type them directly at the MySQL console won't work when they're in a PHP page running from a different web server.
    I only have ones set of credentials, will I have to make some more?

    Quote Originally Posted by kmount View Post
    What files do you have in your phpmyadmin directory?
    Please fine the attached


    Thanks allot

    Z
    Attached Images Attached Images

  4. #19


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,703
    Thank Post
    352
    Thanked 806 Times in 721 Posts
    Rep Power
    348
    config.inc.php - What's in there?

  5. #20

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,323
    Thank Post
    903
    Thanked 1,802 Times in 1,551 Posts
    Blog Entries
    12
    Rep Power
    467
    <?php
    /*
    * Generated configuration file
    * Generated by: phpMyAdmin 2.11.7 setup script by Michal ÄŚihaĹ™ <michal@cihar.com>
    * Version: $Id: setup.php 10748 2007-10-10 07:30:59Z cybot_tm $
    * Date: Mon, 14 Jul 2008 21:56:49 GMT
    */

    /* Servers configuration */
    $i = 0;

    /* Server localhost (config:root) [1] */
    $i++;
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['extension'] = 'mysql';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['controluser'] = 'root';
    $cfg['Servers'][$i]['controlpass'] = '';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '';

    /* End of servers configuration */

    ?>
    That file is also in config and libraries

    Thanks

    Z

  6. #21


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,703
    Thank Post
    352
    Thanked 806 Times in 721 Posts
    Rep Power
    348
    Nothing's ever simple, I don't use phpmyadmin on windows so I'm perhaps little use.

    I've just downloaded phpmyadmin from their site and there is no "config" directory and the file doesn't exist in libraries.

    Grab this, extract it into your "public" space ie wwwpub or whatever its called in IIS land.

    Copy the config.sample.inc.php file to config.inc.php.

    It should then "just work" as the same config is set to cookie anyway.

    Give that a whirl.

  7. #22

    Join Date
    Jan 2007
    Location
    Durham, UK
    Posts
    328
    Thank Post
    33
    Thanked 17 Times in 12 Posts
    Rep Power
    21
    Theres a script to create the config file in the scripts dir. Think its scripts/setup.php (it is on my server)

    That should let you create the config, you dont need a password if you use cookie auth like kmount said

  8. #23

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,323
    Thank Post
    903
    Thanked 1,802 Times in 1,551 Posts
    Blog Entries
    12
    Rep Power
    467
    Quote Originally Posted by kmount View Post
    Nothing's ever simple, I don't use phpmyadmin on windows so I'm perhaps little use.

    I've just downloaded phpmyadmin from their site and there is no "config" directory and the file doesn't exist in libraries.

    Grab this, extract it into your "public" space ie wwwpub or whatever its called in IIS land.

    Copy the config.sample.inc.php file to config.inc.php.

    It should then "just work" as the same config is set to cookie anyway.

    Give that a whirl.
    Still doesnt work

    Thanks for the help

  9. #24
    Jona's Avatar
    Join Date
    May 2007
    Location
    Cranleigh
    Posts
    471
    Thank Post
    14
    Thanked 51 Times in 49 Posts
    Rep Power
    24
    Ok to add the chaos, below is what I use for my phpmyadmin config.inc.php file. It will prompt you to login and you should use the same credentials that you use at the mysql command prompt.

    I recommend you backup your config first

    Cheers
    Jonas

    Code:
    $i = 0;
    
    /*
     * First server
     */
    $i++;
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'http';
    /* Server parameters */
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['port'] = '3306';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    /* Select mysqli if your server has it */
    $cfg['Servers'][$i]['extension'] = 'mysql';

  10. #25

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,323
    Thank Post
    903
    Thanked 1,802 Times in 1,551 Posts
    Blog Entries
    12
    Rep Power
    467
    Quote Originally Posted by Jona View Post
    Ok to add the chaos, below is what I use for my phpmyadmin config.inc.php file. It will prompt you to login and you should use the same credentials that you use at the mysql command prompt.

    I recommend you backup your config first

    Cheers
    Jonas

    Code:
    $i = 0;
    
    /*
     * First server
     */
    $i++;
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'http';
    /* Server parameters */
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['port'] = '3306';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    /* Select mysqli if your server has it */
    $cfg['Servers'][$i]['extension'] = 'mysql';
    Is that in the http://localhost/phpmyadmin folder? If so that isnt working

    Thanks

  11. #26


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,703
    Thank Post
    352
    Thanked 806 Times in 721 Posts
    Rep Power
    348
    I hate to ask the stupid question but if you rename that folder to "blah" I assume http://localhost/phpmyadmin does actually stop working?

  12. #27

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,323
    Thank Post
    903
    Thanked 1,802 Times in 1,551 Posts
    Blog Entries
    12
    Rep Power
    467
    Yes if i rename i rename, it no longer works

    Thanks

  13. #28


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,703
    Thank Post
    352
    Thanked 806 Times in 721 Posts
    Rep Power
    348
    Hmm...

    I'm intrigued now. Rather than poking it extensively with the stick of no hope, is it possible to get FTP access to the box under a limited account or something to see what its playing at?

  14. #29

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,323
    Thank Post
    903
    Thanked 1,802 Times in 1,551 Posts
    Blog Entries
    12
    Rep Power
    467
    Hi

    We don’t have FTP, this is only a test server and is not live on the net. If my site runs good on IIS i will put it on the main server. I don’t want to get stuck next time. When i migrate to the proper server can i just copy the whole folder over? Or should I just put the website on the test server and on the main one concentrate on getting everything up and running? Does that make sense?

    Instead of FTP I can setup a VPN connection if you like?

    Thanks for the help.

    Z

  15. #30


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,703
    Thank Post
    352
    Thanked 806 Times in 721 Posts
    Rep Power
    348
    VPNs fine.

    In theory, moving from one server to another is relatively straight forward, grab the files, grab a sql dump and off you go.

    EDIT: (Or even RDP as I assume once I'm on the VPN I'll need to access the files somehow ...)
    Last edited by kmount; 15th July 2008 at 07:59 PM.



SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. New user denied access- permission prob?
    By dave.81 in forum Windows
    Replies: 5
    Last Post: 17th January 2008, 03:44 PM
  2. Access Denied - File in Explorer
    By Simcfc73 in forum Windows
    Replies: 4
    Last Post: 10th January 2008, 11:19 AM
  3. Replies: 8
    Last Post: 13th October 2007, 02:05 PM
  4. MySQL Password Problem
    By Ric_ in forum *nix
    Replies: 4
    Last Post: 13th September 2007, 12:28 PM
  5. Now they want my server root password.
    By tickmike in forum General Chat
    Replies: 29
    Last Post: 10th September 2006, 12:23 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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