Page 1 of 1

MySQL errors

PostPosted: 15. November 2010 08:12
by Jashank
Hi,

I've just been placed in charge of an ageing SugarCRM installation, so I'm going to bite the bullet and upgrade it. One of the first things I want to do is create a duplicate of the database and installation to perform an offline upgrade of the system, before placing it live. Of course, I turned to XAMPP, because the system I'm working on runs Windows (sadly).

The issue I'm having is this:

Code: Select all
C:\Documents and Settings\Jashank\My Documents\Sugar\xampp\mysql>bin\mysql -u sugaruser -p
Enter password: ********
ERROR 1045 (28000): Access denied for user 'sugaruser'@'localhost' (using password: YES)


This happens no matter whether a database is selected. It's also happening from the SugarCRM web interface:

Code: Select all
Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'sugaruser'@'localhost' (using password: YES) in C:\Documents and Settings\Jashank\My Documents\Sugar\xampp\htdocs\sugarcrm\include\database\MysqliManager.php on line 284
Could not connect to server localhost as sugaruser.Access denied for user 'sugaruser'@'localhost' (using password: YES)


I know that the password I am entering is definately correct; I've reset it multiple times in phpMyAdmin.

I'm now at my wit's end. What's going on here?

Jashank

Re: MySQL errors

PostPosted: 15. November 2010 08:34
by Altrea
Are you sure that the MySQL-User "superuser" is created in your local test environment?

Re: MySQL errors

PostPosted: 16. November 2010 00:54
by Jashank
I'm certain sugaruser exists. It has all global and database privileges too.

Re: MySQL errors

PostPosted: 16. November 2010 03:50
by JonB
If you restored from a different host - check the locale aka Host of the 'sugaruser' in privileges. You may also have to explicitly GRANT if the user was imported.

Good Luck
:)

Re: MySQL errors

PostPosted: 17. November 2010 08:43
by Jashank
I created sugaruser locally. I also created a second user to see if that would help; it didn't. As a stopgap measure, I'm using the root account, which seems to work, so I have no idea what's going on there.

Re: MySQL errors

PostPosted: 17. November 2010 09:28
by Altrea
is the user sugaruser permitted to login from localhost?

Re: MySQL errors

PostPosted: 17. November 2010 10:39
by JonB
I'm not familar with teh Sugar setup/configuration -

I'm guessing there are parameter's for database name, user/credentials (and perhaps a few other MySQL related things) either in the app itself or in a configuration file. From your comments, I'm guessing you now have supplied 'root' as the database user for Sugar???

What is the MySQL database name for the Sugar application?

and - what is the current Host field value for the user 'root', please???

does 'root' have a PW in MySQL right now????

I'm about 99.5% sure this is a privileges issue (nothing like stating the obvious, eh?) :lol:
(oops, just changed my mind - might also be an Operating System related issue.) Oh well, I'm not perfect...

:)

Re: MySQL errors

PostPosted: 18. November 2010 07:45
by Jashank
Altrea wrote:is the user sugaruser permitted to login from localhost?


Permitted to log on from %, anyway; my understanding is that % allows localhost.

JonB wrote:I'm not familar with teh Sugar setup/configuration -

I'm guessing there are parameter's for database name, user/credentials (and perhaps a few other MySQL related things) either in the app itself or in a configuration file. From your comments, I'm guessing you now have supplied 'root' as the database user for Sugar???


Yes. Parameters are all stored in a config.php file.

JonB wrote:What is the MySQL database name for the Sugar application?


pubnrg_sugar, apparently.

JonB wrote:and - what is the current Host field value for the user 'root', please???

does 'root' have a PW in MySQL right now????


Well, according to a little hack I wrote (and including sugaruser for comparison):

Code: Select all
root@127.0.0.1 (Using password: YES) -- Privileges = ALL PRIVILEGES
root@localhost (Using password: YES) -- Privileges = ALL PRIVILEGES
sugaruser@% (Using password: YES) -- Privileges = SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE, INDEX, ALTER, CREATE TEMPORARY TABLES, CREATE VIEW, EVENT, TRIGGER, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE


I'm about 99.5% sure this is a privileges issue (nothing like stating the obvious, eh?) :lol: [/quote]

I'm agreed, but the privileges are all set sanely.

JonB wrote:(oops, just changed my mind - might also be an Operating System related issue.) Oh well, I'm not perfect...


It could well be. Windows isn't perfect either... :lol:

Jashank

Re: MySQL errors

PostPosted: 18. November 2010 11:59
by Altrea
does the password contains any special chars?
sorry, i don't have many more ideas :D

Re: MySQL errors

PostPosted: 19. November 2010 07:19
by Jashank
Altrea wrote:does the password contains any special chars?


If '.' and ',' count as special characters, yes.

Altrea wrote:sorry, i don't have many more ideas :D


Neither do I. I may have to contact someone at Monty Program, to see if I can find anything.

Re: MySQL errors

PostPosted: 19. November 2010 08:03
by JonB
Jeez - you took them at their word and just plugged it in :shock: Am I right???? is that what your last comment means????

I may have to contact someone at Monty Program,


- I cannot conceive of the right comment.

maybe by tomorrow. Nah - I'll give it a go - "I guess that is how we find out if it works, right???"
:mrgreen:

I think if you made that switch you should have told us...

Windows lacks the base64 encode function - and passwords appear to be the problem in a careful reading, so that was the source of my comment about OS related issues.

You did say that root works - give sugaruser all rights and then start taking away????

I'm with Altrea - not too many really brilliant ideas right now, except maybe ditch special characters and see it if springs to life...

:)

Re: MySQL errors

PostPosted: 19. November 2010 08:37
by Jashank
JonB wrote:Jeez - you took them at their word and just plugged it in :shock: Am I right???? is that what your last comment means????


No no no no no no no no no no! Of course not! :lol:

I'm using the stock-standard MySQL (which I believe is MySQL 5.1.49-community) from XAMPP 1.7.4b2.

Re: MySQL errors

PostPosted: 19. November 2010 11:55
by JonB
Well, at least you had a few good laughs there @ ole JonB :mrgreen:

- unfortunately, though I have no great new ideas - :(

BUT equally BAD - its the beta - you are supposed to use the Form on the Beta page to report the errors to Kai - they don't check here for Beta errrors

OR are we now having some morning fun????

Re: MySQL errors

PostPosted: 23. December 2010 00:06
by Jashank
Aaha!

After some time off that project, came back to it to discover that, in the version of MySQL shipped, apparently % does not include localhost (which contradicts my understanding of %). Creating a sugaruser@localhost fixed it.

How bizarre.