Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th July 2012, 07:47
tanvir tanvir is offline
Member
 
Join Date: Sep 2011
Posts: 35
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Skype™ to tanvir
Question How to change password of MySql and others?

Hello,

I have configured a two mail servers on openSUSE from here. Now I want to change the password of MySQL and the server. Please tell me step by step how can I do it with out interrupting the services ?

Thanks
Tanvir
Reply With Quote
Sponsored Links
  #2  
Old 29th July 2012, 09:52
rosehosting rosehosting is offline
Member
 
Join Date: Jun 2012
Posts: 39
Thanks: 0
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by tanvir View Post
Hello,

I have configured a two mail servers on openSUSE from here. Now I want to change the password of MySQL and the server. Please tell me step by step how can I do it with out interrupting the services ?

Thanks
Tanvir
Assuming you know your current 'root' passwords, to reset your system's 'root' password you need to login to your server via ssh and execute

Code:
# passwd
it will ask you to enter and confirm your new system's 'root' password.

as for resetting the mysql's 'root' password, you need to login to your mysql server as root by executing:

Code:
# mysql -u root -p
once you're in, you need to change the database to 'mysql'

Code:
mysql> use mysql;
and then reset your mysql's 'root' password by executing:

Code:
mysql> update user set Password=PASSWORD('YOUR_NEW_PASS') WHERE User='root';
to quit the mysql shell type:

Code:
mysql> \q
cheers
Reply With Quote
  #3  
Old 29th July 2012, 10:01
tanvir tanvir is offline
Member
 
Join Date: Sep 2011
Posts: 35
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Skype™ to tanvir
Default

After changing MySQL password will postfix, Apache2, BIND, Dovecot, ISPConfig 3 etc work fine as they are doing now... ?
Reply With Quote
  #4  
Old 29th July 2012, 10:49
rosehosting rosehosting is offline
Member
 
Join Date: Jun 2012
Posts: 39
Thanks: 0
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by tanvir View Post
After changing MySQL password will postfix, Apache2, BIND, Dovecot, ISPConfig 3 etc work fine as they are doing now... ?
I'm not that familiar with ISPConfig 3 and cannot tell for sure if it or its services use a MySQL database, specifically the 'root' account.

You may want to wait for an answer on this from some one who knows how things work in ISPConfig 3.

anyhow, the services like apache, bind, dovecot, postfix should not be affected by the change of your mysql 'root' password.
Reply With Quote
  #5  
Old 30th July 2012, 12:44
tanvir tanvir is offline
Member
 
Join Date: Sep 2011
Posts: 35
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Skype™ to tanvir
Default

Quote:
Originally Posted by rosehosting View Post
I'm not that familiar with ISPConfig 3 and cannot tell for sure if it or its services use a MySQL database, specifically the 'root' account.

You may want to wait for an answer on this from some one who knows how things work in ISPConfig 3.

anyhow, the services like apache, bind, dovecot, postfix should not be affected by the change of your mysql 'root' password.
Thank you rosehosting. I am waiting for someone who knows the answer...
Reply With Quote
  #6  
Old 31st July 2012, 08:50
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,640
Thanks: 793
Thanked 4,999 Times in 3,910 Posts
Default

ISPConfig uses the mysql root password only to create new databases, all other operations are donw ith the less priveliged mysql user "ispconfig". So after you changed the mysql root password change it in the file /usr/local/ispconfig/server/lib/mysql_clientdb.conf as well.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
tanvir (1st August 2012)
  #7  
Old 7th October 2013, 08:59
tanvir tanvir is offline
Member
 
Join Date: Sep 2011
Posts: 35
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Skype™ to tanvir
Thumbs up Thanks to all

Thanks to everybody for the help.
Please visit this link. I tried to solve it. Now this solution works just fine for me. I guess it might help you.

And feel free to advice or ask questions. We will be pleased to help you.

Thanks
Tanvir
Reply With Quote
Reply

Bookmarks

Tags
mysql, password change, postfix

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:56.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.