{"id":202,"date":"2016-07-05T09:56:06","date_gmt":"2016-07-05T09:56:06","guid":{"rendered":"http:\/\/symbioticindia.in\/docu\/?p=202"},"modified":"2016-07-05T09:56:06","modified_gmt":"2016-07-05T09:56:06","slug":"change-sql-in-trixbox-2-6-1-passwords-step-by-step","status":"publish","type":"post","link":"http:\/\/symbioticindia.in\/docu\/2016\/07\/05\/change-sql-in-trixbox-2-6-1-passwords-step-by-step\/","title":{"rendered":"Change SQL in Trixbox 2.6.1 Passwords Step by Step"},"content":{"rendered":"<div class=\"article-header\">\n<h1 class=\"title entry-title\">http:\/\/trixbox.org\/forums\/trixbox-forums\/open-discussion\/change-default-sql-password-freepbx-version-2-6<\/h1>\n<\/div>\n<div class=\"article-content entry-content\">\nHow to Change MySQL passwords: Follow each step in order !<\/p>\n<p>Step 1) mysql -u root \u2013p [ENTER]<br \/>\nStep 2) Enter password: passw0rd [ENTER]<\/p>\n<p>Welcome to the MySQL monitor. Commands end with ; or \\g.<br \/>\nYour MySQL connection id is 3743 to server version: 5.0.22<\/p>\n<p>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the buffer.<\/p>\n<p>Step 3) mysql&gt; use mysql; [ENTER]<br \/>\nReading table information for completion of table and column names<br \/>\nYou can turn off this feature to get a quicker startup with -A<\/p>\n<p>Database changed<br \/>\nStep 4) mysql&gt; update user set password = PASSWORD(&#8216;NEW_PASSWORD&#8217;) where User = &#8216;asteriskuser&#8217;; [ENTER]`<br \/>\nQuery OK, 1 row affected (0.00 sec)<br \/>\nRows matched: 1 Changed: 1 Warnings: 0<\/p>\n<p>Step 5) mysql&gt; grant all privileges on *.* to root@localhost identified by &#8221;NEW_PASSWORD &#8216; with grant option; [ENTER]<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>Step 6) mysql&gt; show databases; [ENTER]<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br \/>\n| Database |<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br \/>\n| information_schema |<br \/>\n| asterisk |<br \/>\n| asteriskcdrdb |<br \/>\n| asteriskrealtime |<br \/>\n| endpoints |<br \/>\n| meetme |<br \/>\n| mysql |<br \/>\n| sugarcrm |<br \/>\n| test |<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br \/>\n9 rows in set (0.00 sec)<\/p>\n<p>Step 7) mysql&gt; grant all privileges on meetme.* to asteriskuser@localhost; [ENTER]<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>Step 7) mysql&gt; grant all privileges on endpoints.* to asteriskuser@localhost; [ENTER]<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>Step 8) mysql&gt; grant all privileges on asteriskrealtime.* to asteriskuser@localhost; [ENTER]<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>Step 9) mysql&gt; grant all privileges on asteriskcdrdb.* to asteriskuser@localhost; [ENTER]<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>Step 10) mysql&gt; grant all privileges on asterisk.* to asteriskuser@localhost; [ENTER]<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>Step 11) mysql&gt; flush privileges; [ENTER]<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>mysql&gt; exit [ENTER]<br \/>\nBye<\/p>\n<p>OK THIS PART IS FINISHED!<\/p>\n<p>Next\u2026..<\/p>\n<p>Change default passwords:<\/p>\n<p>To change the FreePBX manager pass, you need to edit two separate files and put in the new password.<\/p>\n<p>Step 12) nano \/etc\/asterisk\/manager.conf [ENTER]<\/p>\n<p>Find &#8216;secret = amp111&#8217; under the [admin] section. Change &#8216;amp11&#8217; to your new desired password. CTRL+X followed by &#8216;Y&#8217; to save and exit.<\/p>\n<p>Now, we need to edit the \/etc\/amportal.conf to use our new password.<\/p>\n<p>Step 13) nano \/etc\/amportal.conf [ENTER]<\/p>\n<p>Find the line that says &#8216;AMPMGRPASS=amp111&#8217; and change the &#8216;amp11&#8217; to the new password you just set. CTRL+X followed by &#8216;Y&#8217; to save and exit.<\/p>\n<p>Now we need to edit the \/etc\/cbmysql.conf<\/p>\n<p>Step 14) nano \/etc\/asterisk\/cbmysql.conf [ENTER]<\/p>\n<p>Find the line that says password=passw0rd&#8217; and change the &#8216; passw0rd&#8217; to the new password you just set. CTRL+X followed by &#8216;Y&#8217; to save and exit.<\/p>\n<p>Now we need to edit the \/var\/www\/html\/web-meetme\/lib\/database.php<br \/>\nStep 15) nano \/var\/www\/html\/web-meetme\/lib\/database.php [ENTER]<br \/>\nFind the line that says $password = &#8216;passw0rd&#8217;;&#8217; and change the &#8216;passw0rd&#8217; to the new password you just set. CTRL+X followed by &#8216;Y&#8217; to save and exit.<\/p>\n<p>You will also need to update the password in the \/etc\/asterisk\/cdr_mysql.conf file for call detail records (cdr) and in \/etc\/asterisk\/res_mysql<\/p>\n<p>Step 16) nano \/etc\/asterisk\/cdr_mysql.conf [ENTER]<\/p>\n<p>Find the line that says &#8216;password=amp109&#8217; and change the &#8216;amp109&#8217; to the new password you just set. CTRL+X followed by &#8216;Y&#8217; to save and exit.<\/p>\n<p>Step 17) nano \/etc\/asterisk\/res_mysql.conf [ENTER]<\/p>\n<p>Find the line that says &#8216;dbpass=amp109&#8217; and change the &#8216;amp109&#8217; to the new password you just set. CTRL+X followed by &#8216;Y&#8217; to save and exit.<\/p>\n<p>Step 18) service mysqld restart [ENTER]<\/p>\n<p>Step 19) amportal restart [ENTER]<\/p>\n<p>Ready to Rock \u2018n\u2019 Roll!<\/p>\n<p>*** NOTE: FreePBX\/MySQL does not like having an exclamation point (!) in the password. There may be other special characters that it doesn&#8217;t like also.<\/p>\n<p>Document prepared by: Scott J. Arnold 09\/11\/2008 Contact: Scott@TheVOIPWiz.com<br \/>\nIAX2 Hardware at http:\/\/www.thevoipwiz.com<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/trixbox.org\/forums\/trixbox-forums\/open-discussion\/change-default-sql-password-freepbx-version-2-6 How to Change MySQL passwords: Follow each step in order ! Step 1) mysql -u root \u2013p [ENTER] Step 2) Enter password: passw0rd [ENTER] Welcome to the MySQL monitor. Commands end with ; or \\g. Your MySQL connection id is 3743 to server version: 5.0.22 Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"http:\/\/symbioticindia.in\/docu\/2016\/07\/05\/change-sql-in-trixbox-2-6-1-passwords-step-by-step\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,27],"tags":[],"class_list":["post-202","post","type-post","status-publish","format-standard","hentry","category-asterisk","category-trixbox"],"_links":{"self":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/comments?post=202"}],"version-history":[{"count":1,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/202\/revisions"}],"predecessor-version":[{"id":203,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/202\/revisions\/203"}],"wp:attachment":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/media?parent=202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/categories?post=202"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/tags?post=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}