MySQL root changed password went wrong So basically this is what I did:

mysql&gt; use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql&gt; update user set password=PASSWORD("~)&lt;iXyyj&lt;w!,s!\yZ%]YN#m;d") where User='root';
Query OK, 2 rows affected (0.01 sec)
Rows matched: 2  Changed: 2  Warnings: 0

mysql&gt; flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; exit


And now I can't access using that password. What did I do wrong? maybe the password isn't supposed to have special characters or something?

PS: centos 6.5
You may have to do the following
NEWROOTPASSWORD=&quot;Cha@g3m3&quot;
service mysql restart --skip-grant-tables --skip-networking
SQL=&quot;update mysql.user SET password=PASSWORD('${NEWROOTPASSWORD}') WHERE user='root';&quot;
mysql -ANe&quot;${SQL}&quot;
service mysql restart
mysql -uroot -p${NEWROOTPASSWORD}

If you get the mysql prompt, CONGRATULATIONS !!!
Then, go change the password properly. Don't use the exclamation point or semicolon for a password as they mean something to Linux.
MySQL Documentation for this situation: http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html
Give it a Try !!!