var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
change mysql user password via shell?
Anyone know the commands to change a MySQL user's password via ssh?
I found stuff for changing the root password, and tried to adapt it for the user, but it didn't work.
# mysql -u root -p
> UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='user';
> FLUSH PRIVILEGES;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('newpass')
WHERE User='mysql_user'' at line 1
*user/pass have been removed from actual output*
Try this one
-> SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere');
-> FLUSH PRIVILEGES;
Same error pretty much.
I'm resyncing cPanel now - I'm sure this is the issue of the MySQL password change after upgrading. (yes the lil box for old password support is checked)
Well - I'm using cPanel
with 4.0 password support ON.
And can't change passwords with either of the above commands....
Thuroughly lost. I know I've used those before...
/usr/bin/mysqladmin -u root -p password NEWPASSWORD
(enter old pass)
wouldn't that change the root pass?
I'm looking to reset a client's DB user pass.
/usr/bin/mysqladmin -u username -p password NEWPASSWORD
(enter old pass)
where it says "password", don't change that. make sure it says "password". change "NEWPASSWORD" to your new password.
OH ok - that's probably where I messed up the other ones too. I was entering the old pass where is said "password"
Yeah - working now
didn't fix the problem I had though... but the password has been reset
Thanks for all your help.
I ended up having to rebuild mysql and then change the pass. Which is now working fine again
Last edited by ryno267; 10-12-2007 at
Reason: issue resolved