Page 1 of 2

Brand New Installation- PhpMyAdmin error #1045

PostPosted: 19. July 2009 06:05
by hunterbdb
Hello,

My Problem:
I recently did a FRESH NEW installation of Xampp. Everything works fine. I can open up control panel and start apache and mysql without any problems. But, when I go to http://localhost/phpmyadmin/, I get a page that says this:

Code: Select all
Error
MySQL said:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)
Connection for controluser as defined in your configuration failed.
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.


The error is #1045 - Access denied for user 'root'@'localhost' (using password: NO)
I have never had a problem like this before. Can anyone help me step-by-step? I am willing to fully cooperate. Any help would be appreciated with kindness.

Additional Info:

My config file at C:\xampp\phpMyAdmin\config.inc.php looks like this:
Code: Select all
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';


My my.cnf file located at C:\xampp\mysql\bin\my.cnf looks like this:
Code: Select all
# The following options will be passed to all MySQL clients
[client]
# password       = your_password
port            = 3306
socket          = "C:/xampp/mysql/mysql.sock"

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port= 3306
socket= "C:/xampp/mysql/mysql.sock"
basedir="C:/xampp/mysql"
tmpdir="C:/xampp/tmp"
datadir="C:/xampp/mysql/data"
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error="mysql_error.log"


My MYSQL Version is: 5.1.33
My PhpMyAdmin Version is: 3.1.3.1
My PHP Version is: 5.2.9



-Ben B.

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 19. July 2009 10:55
by Wiedmann
I recently did a FRESH NEW installation of Xampp.

Without copying content from an old installation?

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

- Just installed XAMPP and opening phpMyAdmin, without changing anything else?
- Shure MySQL from XAMPP is running and not an other MySQL?

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 19. July 2009 17:02
by hunterbdb
In response to Wiedman,

Yes, I installed xampp without changing anything. Everything is brand new. I have never had xampp installed on my computer. It couldn't have copied anything from an old installation, because there was never an old installation. I had mysql server installed previously, but I made sure that I uninstalled it using" add&remove programs" from my control panel before I installed xampp. I also went into my environment variables and made sure nothing connected to mysql was there. so my computer was clean.

Still, you've raised a good point: maybe somehow my computer still is running my old mysql, although I don't see how that is. I don't know where the files for it would be located, seeing that everything has been deleted... I did a search on my computer. I spent my half-hour lunchbreak looking for anything related to my old mysql installation. Still, I couldn't find anything.


any more ideas?

and thanks for replying so fast.

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 19. July 2009 17:42
by Wiedmann
maybe somehow my computer still is running my old mysql,

Open your taskmanager and see which MySQL is running.

(also verify there is no my.ini or my.cnf in C:\ or %WINDIR%)

Yes, I installed xampp without changing anything.

Well, with a clean XAMPP installation this must work out of the box...

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 02. August 2009 21:05
by J-Dog
I too am getting this error:

Error

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


I had xampp installed on my C drive but took it off. Then installed it on the D drive. I've never tried phpMyadmin but after installing it on the D I did and I get that error message.

I look in task manager and there is only one mysql running which seems to be linked to the one in the xampp control panel

I am on Win XP home and using Xampp Version 1.7.1

Any ideas?

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 02. August 2009 21:28
by Wiedmann
#1045 - Access denied for user 'root'@'localhost' (using password: NO)

Wiedmann wrote:- Just installed XAMPP and opening phpMyAdmin, without changing anything else?


I've never tried phpMyadmin

Just to make this sure:
If you have never used phpMyAdmin, there are no cookies stored for phpMyAdmin in your browser.

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 02. August 2009 21:59
by J-Dog
Sorry, I had another instance of MYSQL installed from somewhere. I uninstalled and now all is well.

How do I move the localhost home somewhere else?

Thank you.

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 06. September 2010 08:20
by al3x_b
Hi, everyone!
Is anybody going to provide us users with a problem solving solution? :evil:
Had 2 installations of XAMPP: windows vista ultimate x86 (under VMWare 7) & windows 7 ultimate x86.
Followed the instructions on installing and configuring the application of Bill Weinmann at Lynda.com (http://www.lynda.com/home/DisplayCourse.aspx?lpk2=770).
After adding the 'c:\xampp\mysql\bin' path to 'Environment Variables', starting 'cmd.exe' and typing 'mysql' + enter => resulted in the well-known error message appearing:
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

It seems to be a common problem. What can be done?

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 06. September 2010 12:44
by Nobbie
al3x_b wrote:It seems to be a common problem. What can be done?


Its the most common problem: lack of reading documentation. What can be done? Read the documentation (about mysql command line interpreter for example). Very first step: try "mysql --help".

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 06. September 2010 13:59
by JonB
Is anybody going to provide us users with a problem solving solution?
What can be done?


send an e-mail to Bill Weinmann at Lynda.com

OR Adopt the 'Google is your friend' concept,'

OR Search this forum for 'mysql,exe error 1045' or 'mysql.exe parameters',

OR Use the phpMyAdmin included in the XAMPP suite to discover what users your database does have,

OR do as nobbie suggests, and read the documentation, it will get you to the root of the matter.

Note: the direct and correct answer to your query is in my list of suggestions, although all of them will lead to the right answer. You might also consider working on your tactics, as these forums are answered by volunteers.

"not good manners when you want/need something" => :evil:

8)

ysfpa

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 07. September 2010 13:08
by al3x_b
Thank you for replies!
I am sorry for being impolite and... newbie!)) I was/am now in a rush, that's why I wanted to get a prompt answer... :oops:
There is a default user in MySQL present: root with no password. An error message is displayed, when trying to enter this way:
Code: Select all
mysql -u root
or
Code: Select all
mysql -u root -p

Here is an extract from my 'config.inc.php' file:
Code: Select all
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type']            = 'config';
$cfg['Servers'][$i]['user']                 = 'root';
$cfg['Servers'][$i]['password']             = '';
$cfg['Servers'][$i]['AllowNoPassword']      = true;

/* Server parameters */
$cfg['Servers'][$i]['host']             = 'localhost';
$cfg['Servers'][$i]['connect_type']     = 'tcp';
$cfg['Servers'][$i]['compress']         = false;

Here is what I've done:
Image
But still, I am sure that I haven't achieved my goal. According to the aforementioned video tutorial after login to mysql, 'C:\Users\User' turns to 'mysql'...
Why am I not able to enter with the 'root' user? And who is this 'ODBC' user?

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 07. September 2010 13:42
by Nobbie
al3x_b wrote:But still, I am not sure if I've achieved my goal.


You didn't. :-(

As well as you didn't follow my advice. :-(

Once again, and last try: enter "mysql --help" and read the help text.

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 07. September 2010 16:26
by JonB
Umm - I think you need to make a decision:

whether tis nobler to EXACTLY follow the book/videos instructions or to learn things in an adaptive fashion.

'C:\Users\User' turns to 'mysql'...


do you have a folder '\Users\User in the root of your C: drive??? Probably not - unless YOU created it following those instructions.

The video 'probably' assumes you have installed MySQL and Apache in standalone modes and welded then together, LOL. I use the word probably here because I didn't write/present that tutorial. I don't know your reason for choosing XAMPP (or it could hvae been WAMP as easily) - but both are suites, and they work on a different set of assumptions about default locations and 'how things are supposed to fit together'. I can't say if that video discussed installing under XAMPP, but if it did - the question would be 'what version of XAMMP?'.

We 'helper-folks' can't guess what the author had in mind. XAMPP works almost flawlessly 'out of the box', as long as you don't try to install in 'Program Files' or other special purpose folders/directories. You should look in the 'installing' section of the materials you have and see what the working assumptions were, and then decide the best course of action. We are here to support XAMPP, as it was intended to be installed, with the feature set it came with - that's a big enough task, trust me.

As for your CURRENT exact problem (getting the mysql monitor to run) - read (and follow) this page literally about logging on/connecting:

http://dev.mysql.com/doc/refman/5.1/en/ ... tions.html

Assume that if you don't see an option on that page, its not going to work. Nobbie (and I - hopefully) are putting you on the road to self-suffiency.

Nobbie's text needs a tiny amendment: mysql.exe -- help | more (that's the pipe symbol)

Good Luck
8)

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 07. September 2010 17:21
by al3x_b
JonB wrote:do you have a folder '\Users\User in the root of your C: drive??? Probably not - unless YOU created it following those instructions.

I wrote 'User' replacing the actual name of my windows user acount. So, it is 'C:\Users\myUserAccount'.

The author explains MySQL basics using XAMPP application (as a test environment). As far as I know, he uses the 1.7.1 version (2009/04/14) of XAMPP. He explains everything pretty understandable, step by step (installing -> configuring -> running -> etc.).

According to him (briefly):
1) Turn off UAC;
2) XAMPP Control Panel Application -> MySQL: Start -> Apache: Start;
3) Start -> Control Panel -> System and Maintenance -> System -> Advanced system settings -> Advanced -> Environment Variables -> System variables -> Path: Edit -> Variable value -> add to the end: semicolon + C:\xampp\mysql\bin -> OK;
4) Run cmd.exe -> Type: mysql -> Press 'Enter'.
Result:
Image

Re: Brand New Installation- PhpMyAdmin error #1045

PostPosted: 07. September 2010 18:48
by Nobbie
Now, after you have edited your previous posting, you succeded in calling mysql with user root (instead of ODBC).

But, obviously your user "root" either has a password - or you have no user "root". I cannot help you with that, because you must have changed the MySQL Database, as per default user "root" comes without a password.