my intention was to password mysql in wampserver2.2e
Whwn I enter the cmd WHERE user='root';
I get syntax error.
error
Page 1 of 12 Replies - 230 Views - Last Post: 14 September 2012 - 04:53 AM
Replies To: error
#2
Re: error
Posted 14 September 2012 - 03:24 AM
Are you trying to change the MySQL root password in WAMP? If so:
You will also need to update your phpMyAdmin config files to reflect these changes.
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;
You will also need to update your phpMyAdmin config files to reflect these changes.
#3
Re: error
Posted 14 September 2012 - 04:53 AM
It's generally better to not manually update system tables like that. MySQL has a SET PASSWORD command that basically does the same thing the UPDATE query does.
To change the password for the current user:
Or, if you log in with a root-like user, you can change passwords for any user:
The FLUSH PRIVILEGES is taken care of as well, so no need to do that manually.
We'd need to see the actual syntax, and the actual error, to be able to spot the problem.
To change the password for the current user:
SET PASSWORD = PASSWORD('your new password');
Or, if you log in with a root-like user, you can change passwords for any user:
SET PASSWORD FOR 'user'@'host' = PASSWORD('new password');
The FLUSH PRIVILEGES is taken care of as well, so no need to do that manually.
tamunoemi, on 14 September 2012 - 09:44 AM, said:
Whwn I enter the cmd WHERE user='root';
I get syntax error.
I get syntax error.
We'd need to see the actual syntax, and the actual error, to be able to spot the problem.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|