Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
28ebb5a6
Commit
28ebb5a6
authored
Mar 16, 2004
by
vva@eagle.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug #3160 '"mysqladmin password" doesn't work if --skip-grant-tables'
parent
36120d42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
client/mysqladmin.c
client/mysqladmin.c
+24
-3
No files found.
client/mysqladmin.c
View file @
28ebb5a6
...
...
@@ -787,9 +787,30 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
if
(
mysql_query
(
mysql
,
buff
))
{
my_printf_error
(
0
,
"unable to change password; error: '%s'"
,
MYF
(
ME_BELL
),
mysql_error
(
mysql
));
return
-
1
;
if
(
mysql_errno
(
mysql
)
!=
1290
)
{
my_printf_error
(
0
,
"unable to change password; error: '%s'"
,
MYF
(
ME_BELL
),
mysql_error
(
mysql
));
return
-
1
;
}
else
{
sprintf
(
buff
,
"UPDATE mysql.user SET password='%s' WHERE user='%s' and"
" host=substring_index(user(),_utf8
\"
@
\"
,-1)"
,
crypted_pw
,
user
);
if
(
mysql_query
(
mysql
,
buff
))
{
my_printf_error
(
0
,
"unable to update user table; error: '%s'"
,
MYF
(
ME_BELL
),
mysql_error
(
mysql
));
return
-
1
;
}
if
(
mysql_query
(
mysql
,
"set sql_log_off=0"
))
{
my_printf_error
(
0
,
"Can't turn on logging; error: '%s'"
,
MYF
(
ME_BELL
),
mysql_error
(
mysql
));
return
-
1
;
}
}
}
argc
--
;
argv
++
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment