View Tutorial Metadata Edit Content Revision History Add to Watchlist Add New Tutorial How to set or change MySQL server password

How to set or change MySQL server password

If you are running XAMPP for example, there is no password set for root which is highly insecure as anyone can connect and see your data.

Here is how you can set or change the MySQL password for any user including root.

If you don't have a password already set run this on command prompt :

mysqladmin -u USERNAME password PASSWORD_YOU_WANT

otherwise run this :

mysqladmin -u USERNAME -p 'CURRENT_PASSWORD' password 'PASSWORD_YOU_WANT'

Only plain text supported.

Optional

Required - will be kept private

Optional

 
 

Rating: (0+, 0-) In: MySQL, MySQL 5, MySQL 4