dicky96 Posted March 24, 2008 Share Posted March 24, 2008 Hi guys (and girls) Firstly I apologise if I put this in the wrong section. However, hopefully one of you could point me in the right direction here, I'm new to this so only have a rough understanding of what I'm doing, but no better way to learn than try I guess.... I'm trying to get PhpMyAdmin to work on my local server (on my LAN) which I only use for learning this stuff, not for running a live site, so I'm not heavily concerned about security levels etc. To use PhpMy Admin I've figured I needed to create a configuration file, which I used the setup script to create as follows <?php /* * Generated configuration file * Generated by: phpMyAdmin 2.11.5-rc1 setup script by Michal Čihař <michal@cihar.com> * Version: $Id: setup.php 10748 2007-10-10 07:30:59Z cybot_tm $ * Date: Mon, 24 Mar 2008 12:58:03 GMT */ /* Servers configuration */ $i = 0; /* Server localhost (config:root) [1] */ $i++; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; /* End of servers configuration */ ?> When I try to use PhpMyAdmin I get this error Welcome to phpMyAdmin 2.11.5-rc1 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. Error MySQL said: #1045 - Access denied for user 'root'@'localhost' (using password: NO) As far as I recall when i installed mysql a few weeks back I didn't set a user name or password - so what's causing the problem? Where can I check this (in some ini file?) to see if I did set a user/pass when I installed mysql and have now forgot LOL. Also in the phpmyadmin setup script a lot of the server setting boxes (port number etc) were blank. Is this OK? From what I have read on the net it says just to leave these settings alone I'm using PHP 5.25, Mysql 5, PhpMyAdmin 2.11.5-rc1 - all of which I installed and configured manually, after something of a tussle with .ini and .dll files I thought I had it all working but maybe I made a mistake somewhere which is causing this error with PhpMyAdmin Best regards dicky Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 24, 2008 Share Posted March 24, 2008 If you are getting that error, then that suggests A) You have setup a password for the root account but you have forgotten it B) MySQL is refusing connections from localhost. To see if a password is set for the root user open a MySQL terminal by going to Start > Run and typing in cmd into the run box. Click ok to open the command line Now type the following command: mysql -u root and press enter. If no password is set for the root user you should be shown the MySQL Monitor. If there is a password set you'll receive the Access denied error message. If you have forgotten the password for the root user then you'll need to reset it. Quote Link to comment Share on other sites More sharing options...
dicky96 Posted March 26, 2008 Author Share Posted March 26, 2008 Yes! Thanks for that - problem solved. I had indeed set a password - to be honest there was so much going on when I installed all this Apache-MySql-PHP stuff manually and with no prior experience of such things, I had quite simply forgotten I had set a password best regards dicky Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.