PDA

View Full Version : MYSQL; setting/updating the root password question...


rh-penguin
30th January 2007, 16:11
hi,

Im doing the: How To Set Up A Ubuntu/Debian LAMP Server(Im using debian)
About half way down is the MYSQL Section.
Creating users to use MySQL and Changing Root Password

By default mysql creates user as root and runs with no passport. You might need to change the root password.

To change Root Password

mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';
mysql> FLUSH PRIVILEGES;
On the line:mysql> UPDATE user SET Password=PASSWORD('new-password') WHEREWould i put:
mysql> UPDATE user SET Password=dondude4482('new-password') WHERE

marsvin
30th January 2007, 17:18
No you'd put:

mysql> UPDATE user SET Password=password('dondude4482') WHERE etc...


The first "password" is the name of the column you're updating (the "password" column in the "user" table.) The second "password" is a mysql function that encrypts whatever is between the parenthesis and 'dondude4482' is your actual password.

-- marsvin

rh-penguin
30th January 2007, 19:47
ok, thanks