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 offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,792
Thanks: 821
Thanked 5,338 Times in 4,188 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 31st July 2012, 10:43
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

Quote:
Originally Posted by till View Post
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.
Just being curious, If I do as you said then will postfix, Apache2, BIND, Dovecot, ISPConfig 3 work fine as they are working now ?
Reply With Quote
  #8  
Old 31st July 2012, 18:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Apache and BIND are fine as they don't use MySQL as backend. For Postfix, Dovecot, and ISPConfig you will have to update the MySQL password in the appropriate configuration files.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 1st August 2012, 09:07
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
Smile

Quote:
Originally Posted by falko View Post
Apache and BIND are fine as they don't use MySQL as backend. For Postfix, Dovecot, and ISPConfig you will have to update the MySQL password in the appropriate configuration files.
till has described how to change the for ISPConfig 3. Thanks for that. Can you tell ma how to change for Postfix and Dovecot ?
Reply With Quote
  #10  
Old 1st August 2012, 14:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
 
Default

For Postfix, you must modify the mysql*.cf files in the /etc/postfix/ directory. The same has to be done for dovecot.conf (which is either in /etc/or /etc/dovecot/). Restart both daemons afterwards.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
tanvir (6th August 2012)
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 23:44.


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