Client does not support authentication protocol - 2 part question
am 07.12.2004 14:40:50 von Ola One
Hello all, this may be a bit wordy, but I am still a newbie and does not
want to mess up my installation. So here I go.
Please someone direct me as to how I fix this problem. I know what the
('newpwd') that I set is, but I need help with other variables.
Here is what I found in the Mysql manual, but I need to be sure of what to
key into the system.
To solve this problem, you should use one of the following approaches:
Upgrade all client programs to use a 4.1.1 or newer client library.
When connecting to the server with a pre-4.1 client program, use an account
that still has a pre-4.1-style password.
Reset the password to pre-4.1 style for each user that needs to use a
pre-4.1 client program. This can be done using the SET PASSWORD statement
and the OLD_PASSWORD() function:
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Alternatively, use UPDATE and FLUSH PRIVILEGES:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES
In looking at the two options above, am I supposed to provide values for the
folloowing?
'some_user'
'some_host'
Secondly, what do I do with the following:
Tell the server to use the older password hashing algorithm:
Start mysqld with the --old-passwords option.
Assign an old-format password to each account that has had its password
updated to the longer 4.1 format. You can identify these accounts with the
following query:
mysql> SELECT Host, User, Password FROM mysql.user
-> WHERE LENGTH(Password) > 16;
Do I type the above as is, or do I substitute User and Host?
For each account record displayed by the query, use the Host and User values
and assign a password using the OLD_PASSWORD() function and either SET
PASSWORD or UPDATE, as described earlier.
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Client does not support authentication protocol - 2 part question
am 07.12.2004 14:57:43 von Daniel da Veiga
Greetings,
On Tue, 07 Dec 2004 08:40:50 -0500, Ola One wrote:
> Hello all, this may be a bit wordy, but I am still a newbie and does not
> want to mess up my installation. So here I go.
>
> Please someone direct me as to how I fix this problem. I know what the
> ('newpwd') that I set is, but I need help with other variables.
>
> Here is what I found in the Mysql manual, but I need to be sure of what to
> key into the system.
>
> To solve this problem, you should use one of the following approaches:
>
> Upgrade all client programs to use a 4.1.1 or newer client library.
> When connecting to the server with a pre-4.1 client program, use an account
> that still has a pre-4.1-style password.
> Reset the password to pre-4.1 style for each user that needs to use a
> pre-4.1 client program. This can be done using the SET PASSWORD statement
> and the OLD_PASSWORD() function:
>
> mysql> SET PASSWORD FOR
> -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
>
> Alternatively, use UPDATE and FLUSH PRIVILEGES:
>
> mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
> -> WHERE Host = 'some_host' AND User = 'some_user';
> mysql> FLUSH PRIVILEGES
>
> In looking at the two options above, am I supposed to provide values for the
> folloowing?
>
> 'some_user'
> 'some_host'
>
Yes, you must know the user name that must use the old password
format, and the host from where he will connect. If you already have
the user, use the SQL query bellow to search wich users/hosts
combinations need to be set to old format. If not, be sure that when
you create users, you'll set their password using the OLD_PASSWORD
function.
> Secondly, what do I do with the following:
>
> Tell the server to use the older password hashing algorithm:
> Start mysqld with the --old-passwords option.
> Assign an old-format password to each account that has had its password
> updated to the longer 4.1 format. You can identify these accounts with the
> following query:
>
> mysql> SELECT Host, User, Password FROM mysql.user
> -> WHERE LENGTH(Password) > 16;
>
> Do I type the above as is, or do I substitute User and Host?
You type it as is, because Host and User are columns from the "user"
table at the "mysql" database, with this you'll search and receive a
result showing all users that have set their passwords to the new
format, so, you'll have a list with all users that need theirs
passwords reset to the old format.
> For each account record displayed by the query, use the Host and User values
> and assign a password using the OLD_PASSWORD() function and either SET
> PASSWORD or UPDATE, as described earlier.
>
So, you'll start your server with the --old-passwords option, now,
your server will look for passwords in the old format, but the users
that have their passwords with the new format will still have
problems. You use that SQL query to get their names and hosts and
using the first query described in the manual (you can choose using
SET PASSWORD using the OLD_PASSWORD() function or UPDATE and FLUSH
PRIVILEGES) you'll set their pass to the old format, slaying your
password problem :)
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=danieldaveiga@gmail.com
>
>
Best regards,
--
Daniel da Veiga
Computer Operator - RS - Brazil
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Client does not support authentication protocol - 2 part question
am 08.12.2004 18:13:52 von Daniel da Veiga
Hello,
On Tue, 07 Dec 2004 09:39:10 -0500, Ola One wrote:
> Thanks Daniel, so on my server, I have one user. I have changed root user to
> another name that I chose. The name is the only user name on this server.
> All I need now is the Host name.
Your server has only one user? And it has full access to databases? If
that is the case, I don't think you'll have to reset to the old
password format using that syntax, as I see, that is designed for a
migration of a system with more users and different hosts
combinations.
> Since I know that, do I still need to start the server with the
> --oldpassword option? I think my installation is mysqld-max-nt does that not
> matter?
I really don't think so, guess you can just reset the password for
your "super" user and that is it.
> And for wanting to be crystal clear,
>
> I will say that I need to do them in the following order:
>
> 1. Start mysqld with the --old-passwords option. Must I do this before I
> can do step #2?
>
> 2. mysql> SELECT Host, User, Password FROM mysql.user
> -> WHERE LENGTH(Password) > 16;
In order to access your MySQL system, you need to authenticate, but
you say you have received an errror related to the password, so, yes,
you may need to start the server with the --old-passwords, so you can
authenticate your "super" user, and manipulate data on your database
(using the SELECT and UPDATE or SET). If you start it with that option
and that solve your access problem, you can even use a GUI (like MySQL
Administrator or SQLyog) and configure your users and hosts.
> The above will give me the Host and User combo that needs to be updated.
>
> 3. mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
> -> WHERE Host = 'some_host' AND User = 'some_user';
> mysql> FLUSH PRIVILEGES;
>
> Will it be in this order, or since I have one user, do I just do #2and I am
> done?
> And just in case I decide to add another user, is all I need to do is to
> repeat #2 for each additional user.
No, your repeat step 3 of your list, the step 2 gives your a table
with all user and host combinations that uses new password format, if
you have only one user, and it is using an old password, that SELECT
will give you an empty set.
> Can I get the Host and Username combination by running #2 without starting
> mysql with the old password option?
Dunno, can you? That is your whole problem, to know if its because of
the format that you're having problems. If you start it with the
option and it authenticates you, problem solved.
> Thanks again
Anytime.
> >From: Daniel da Veiga
> >Reply-To: Daniel da Veiga
> >To: MySQL Win32 List
> >Subject: Re: Client does not support authentication protocol - 2 part
> >question
> >Date: Tue, 7 Dec 2004 11:57:43 -0200
>
>
> >
> >Greetings,
> >
> >On Tue, 07 Dec 2004 08:40:50 -0500, Ola One wrote:
> > > Hello all, this may be a bit wordy, but I am still a newbie and does not
> > > want to mess up my installation. So here I go.
> > >
> > > Please someone direct me as to how I fix this problem. I know what the
> > > ('newpwd') that I set is, but I need help with other variables.
> > >
> > > Here is what I found in the Mysql manual, but I need to be sure of what
> >to
> > > key into the system.
> > >
> > > To solve this problem, you should use one of the following approaches:
> > >
> > > Upgrade all client programs to use a 4.1.1 or newer client library.
> > > When connecting to the server with a pre-4.1 client program, use an
> >account
> > > that still has a pre-4.1-style password.
> > > Reset the password to pre-4.1 style for each user that needs to use a
> > > pre-4.1 client program. This can be done using the SET PASSWORD
> >statement
> > > and the OLD_PASSWORD() function:
> > >
> > > mysql> SET PASSWORD FOR
> > > -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
> > >
> > > Alternatively, use UPDATE and FLUSH PRIVILEGES:
> > >
> > > mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
> > > -> WHERE Host = 'some_host' AND User = 'some_user';
> > > mysql> FLUSH PRIVILEGES
> > >
> > > In looking at the two options above, am I supposed to provide values for
> >the
> > > folloowing?
> > >
> > > 'some_user'
> > > 'some_host'
> > >
> >
> >Yes, you must know the user name that must use the old password
> >format, and the host from where he will connect. If you already have
> >the user, use the SQL query bellow to search wich users/hosts
> >combinations need to be set to old format. If not, be sure that when
> >you create users, you'll set their password using the OLD_PASSWORD
> >function.
> >
> > > Secondly, what do I do with the following:
> > >
> > > Tell the server to use the older password hashing algorithm:
> > > Start mysqld with the --old-passwords option.
> > > Assign an old-format password to each account that has had its password
> > > updated to the longer 4.1 format. You can identify these accounts with
> >the
> > > following query:
> > >
> > > mysql> SELECT Host, User, Password FROM mysql.user
> > > -> WHERE LENGTH(Password) > 16;
> > >
> > > Do I type the above as is, or do I substitute User and Host?
> >
> >You type it as is, because Host and User are columns from the "user"
> >table at the "mysql" database, with this you'll search and receive a
> >result showing all users that have set their passwords to the new
> >format, so, you'll have a list with all users that need theirs
> >passwords reset to the old format.
> >
> > > For each account record displayed by the query, use the Host and User
> >values
> > > and assign a password using the OLD_PASSWORD() function and either SET
> > > PASSWORD or UPDATE, as described earlier.
> > >
> >
> >So, you'll start your server with the --old-passwords option, now,
> >your server will look for passwords in the old format, but the users
> >that have their passwords with the new format will still have
> >problems. You use that SQL query to get their names and hosts and
> >using the first query described in the manual (you can choose using
> >SET PASSWORD using the OLD_PASSWORD() function or UPDATE and FLUSH
> >PRIVILEGES) you'll set their pass to the old format, slaying your
> >password problem :)
> >
> > > --
> > > MySQL Windows Mailing List
> > > For list archives: http://lists.mysql.com/win32
> > > To unsubscribe:
> >http://lists.mysql.com/win32?unsub=danieldaveiga@gmail.com
> > >
> > >
> >
> >Best regards,
> >--
> >Daniel da Veiga
> >Computer Operator - RS - Brazil
> >
> >--
> >MySQL Windows Mailing List
> >For list archives: http://lists.mysql.com/win32
> >To unsubscribe: http://lists.mysql.com/win32?unsub=ola_atb@hotmail.com
> >
>
>
--
Daniel da Veiga
Computer Operator - RS - Brazil
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org