CHANGING MYSQL USERNAME AND PASSWORD

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Parody
Forum Contributor
Posts: 252
Joined: Fri May 06, 2005 7:06 pm
Location: Great Britain

CHANGING MYSQL USERNAME AND PASSWORD

Post by Parody »

How do you change the MYSQL default username and password for a localhost?

All Help Appreciatted

:D :D :D :D :D :D :D :D :D
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

goto your cpanel, your host probebly gave you that, then just goto mysql and change it
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

If it's on your own machine then do this in a console window or command prompt.

Code: Select all

-bash $ mysql -u username -p
mysql> Password: *******
mysql> set password=password(&quote;your new password here&quote;);
mysql> exit;
-bash $ _
and if you're talking about a database on your hosts server elsewhere do this on your own machine....

Code: Select all

-bash $ mysql -u username -h the_url_of_the_server.com -p
mysql> Password: *******
mysql> set password=password(&quote;your new password here&quote;);
mysql> exit;
-bash $ _
:wink:
Post Reply