View Tutorial Metadata Edit Content Revision History Add New Tutorial Add to Watchlist 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'

Talk icons discuss – in the article above, point your mouse over them to reply.
Can't find a relevant Talk icon for what you have to say? See how you can add one...
Note: All the talks and replies are also listed below.


Add a new discussion topic (Only if you don't find it above, duplicates will be removed)


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