mirror of https://github.com/apache/cloudstack.git
33 lines
4.8 KiB
HTML
33 lines
4.8 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>18.3. Changing the Database Password</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-Admin_Guide-4.0.0-incubating-en-US-1-" /><link rel="home" href="index.html" title="CloudStack Administrator's Guide" /><link rel="up" href="manage-cloud.html" title="Chapter 18. Managing the Cloud" /><link rel="prev" href="change-database-config.html" title="18.2. Changing the Database Configuration" /><link rel="next" href="admin-alerts.html" title="18.4. Administrator Alerts" /></head><body><p id="title"><a class="left" href="http://cloudstack.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://docs.cloudstack.org"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="change-database-config.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="admin-alerts.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" id="change-database-password" lang="en-US"><div class="titlepage"><div><div><h2 class="title" id="change-database-password">18.3. Changing the Database Password</h2></div></div></div><div class="para">
|
||
You may need to change the password for the MySQL account used by CloudStack. If so, you'll need to change the password in MySQL, and then add the encrypted password to <code class="filename">/etc/cloud/management/db.properties</code>.
|
||
</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
|
||
Before changing the password, you'll need to stop CloudStack's management server and the usage engine if you've deployed that component.
|
||
</div><pre class="screen">
|
||
<code class="command"># service cloud-management stop</code>
|
||
<code class="command"># service cloud-usage stop</code></pre></li><li class="listitem"><div class="para">
|
||
Next, you'll update the password for the CloudStack user on the MySQL server.
|
||
</div><pre class="screen">
|
||
<code class="command"># mysql -u root -p</code></pre><div class="para">
|
||
At the MySQL shell, you'll change the password and flush privileges:
|
||
</div><pre class="screen">
|
||
<code class="command">update mysql.user set password=PASSWORD("newpassword123") where User='cloud';</code>
|
||
<code class="command">flush privileges;</code>
|
||
<code class="command">quit;</code></pre></li><li class="listitem"><div class="para">
|
||
The next step is to encrypt the password and copy the encrypted password to CloudStack's database configuration (<code class="filename">/etc/cloud/management/db.properties</code>).
|
||
</div><pre class="screen">
|
||
<code class="command"># java -classpath /usr/share/java/cloud-jasypt-1.8.jar \ org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh \ input="newpassword123" password="`cat /etc/cloud/management/key`" \ verbose=false </code></pre><div class="note"><div class="admonition_header"><h2>File encryption type</h2></div><div class="admonition"><div class="para">
|
||
Note that this is for the file encryption type. If you're using the web encryption type then you'll use password="management_server_secret_key"
|
||
</div></div></div></li><li class="listitem"><div class="para">
|
||
Now, you'll update <code class="filename">/etc/cloud/management/db.properties</code> with the new ciphertext. Open <code class="filename">/etc/cloud/management/db.properties</code> in a text editor, and update these parameters:
|
||
</div><pre class="programlisting">
|
||
db.cloud.password=ENC(encrypted_password_from_above)
|
||
db.usage.password=ENC(encrypted_password_from_above)
|
||
</pre></li><li class="listitem"><div class="para">
|
||
After copying the new password over, you can now start CloudStack (and the usage engine, if necessary).
|
||
</div><pre class="screen">
|
||
<code class="command"># service cloud-management start</code>
|
||
<code class="command"># service cloud-usage start</code>
|
||
</pre></li></ol></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="change-database-config.html"><strong>Prev</strong>18.2. Changing the Database Configuration</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="admin-alerts.html"><strong>Next</strong>18.4. Administrator Alerts</a></li></ul></body></html>
|