{"id":46,"date":"2011-03-12T08:08:54","date_gmt":"2011-03-12T08:08:54","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=46"},"modified":"2011-08-11T06:10:33","modified_gmt":"2011-08-11T06:10:33","slug":"change-mamp-mysql-password","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/change-mamp-mysql-password\/","title":{"rendered":"Change MAMP MySQL password"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/mamplogo.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"51\" data-permalink=\"https:\/\/pixert.com\/blog\/change-mamp-mysql-password\/mamplogo\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/mamplogo.png?fit=128%2C128&amp;ssl=1\" data-orig-size=\"128,128\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"MAMP &amp;#8211; the logo\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/mamplogo.png?fit=128%2C128&amp;ssl=1\" class=\"alignleft size-full wp-image-51\" title=\"MAMP - the logo\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/mamplogo.png?resize=128%2C128\" alt=\"\" width=\"128\" height=\"128\" \/><\/a>MAMP creates a local server environment on Mac OS X by installing Apache, PHP and MySQL right out of the box.<\/p>\n<p>The default username\/password for MySQL install is root\/root. That&#8217;s not safe. For security purposes, in our case we want sync between our WAMP and MAMP , it&#8217;s best to change that.<\/p>\n<p>Open the <strong>Mac OS Terminal Application<\/strong> (located in &#8220;\/Applications\/Utilities&#8221;) and enter the following line<\/p>\n<pre class=\"brush: bash; title: Code Block; notranslate\" title=\"Code Block\">\/Applications\/MAMP\/Library\/bin\/mysqladmin -u root -p password &#x5B;NewPassword]<\/pre>\n<p>&gt;&gt; replace [NewPassword] with new password.<br \/>\nIt will ask for the current password after you hit enter. Once you&#8217;ve entered that, the MySQL password is changed<\/p>\n<p>Not over yet, open a text editor and change the password in the following files:<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">\/Applications\/MAMP\/bin\/phpMyAdmin-X.X.X\/config.inc.php<\/pre>\n<p>There&#8217;s the line that reads<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">$cfg&#x5B;'Servers']&#x5B;$i]&#x5B;'password'] = 'root'<\/pre>\n<p>&gt;&gt; change the value &#8216;roor&#8217; to the new password, retaining the quotes<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">\/Applications\/MAMP\/bin\/mamp\/index.php<\/pre>\n<p>There&#8217;s the line that reads<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">$link= @mysql_connect('\/Applications\/MAMP\/tmp\/mysql\/mysql.sock','root','root'); ;<\/pre>\n<p>&gt;&gt; change the last parameter to the new password<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">\/Applications\/MAMP\/bin\/stopMySQL.sh<\/pre>\n<p>&gt;&gt; replace the -proot with the new password.<br \/>\nNote: if we don&#8217;t change this one, we can have zombie mysqld&#8217;s running after you thought you stopped the server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MAMP creates a local server environment on Mac OS X by installing Apache, PHP and MySQL right out of the box. The default username\/password for MySQL install is root\/root. That&#8217;s not safe. For security purposes, in our case we want sync between our WAMP and MAMP , it&#8217;s best to change that. Open the Mac [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":51,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[34],"tags":[36,26,28],"class_list":["post-46","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mac-os","tag-mac-os-2","tag-mamp","tag-mysql"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/mamplogo.png?fit=128%2C128&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-K","jetpack-related-posts":[{"id":198,"url":"https:\/\/pixert.com\/blog\/the-basic-of-wordpress-post-revisions\/","url_meta":{"origin":46,"position":0},"title":"The Basic of WordPress Post Revisions","author":"Pixel Insert \/ Pixert","date":"February 12, 2012","format":false,"excerpt":"WordPress has built in feature that automatically saves versions or revisions of your posts as you edit and create them. WordPress, by default, will save copies of each edit made to a post or page, allowing the possibility of reverting to a previous version of that post or page. The\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":328,"url":"https:\/\/pixert.com\/blog\/mac-app-store-updates-for-other-accounts-bug\/","url_meta":{"origin":46,"position":1},"title":"Mac App Store: &#8220;You Have Updates Available for Other Accounts&#8221;","author":"Pixel Insert \/ Pixert","date":"September 21, 2013","format":false,"excerpt":"This what was happening when I tried to update Coda 2 on Mac I have only one Apple ID, when I clicked the Purchases tab, the button next to Coda 2 showed Update. I clicked it and got a dialog, \u201cYou have updates available for other accounts.\u201d This is how\u2026","rel":"","context":"In &quot;Mac OS&quot;","block_context":{"text":"Mac OS","link":"https:\/\/pixert.com\/blog\/category\/mac-os\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":92,"url":"https:\/\/pixert.com\/blog\/how-to-uninstall-apps-from-mac-app-store\/","url_meta":{"origin":46,"position":2},"title":"How To : Uninstall Apps from Mac App Store","author":"Pixel Insert \/ Pixert","date":"April 19, 2011","format":false,"excerpt":"I installed Mactracker from Mac App Store. It's a good app, but I don't need it anymore. How to uninstall it? OS X doesn't have a Remove Program tool, the answer is simpler than that. You uninstall it the way you uninstall most Mac programs. navigate to [Your User Name]\/Applications,\u2026","rel":"","context":"In &quot;Mac OS&quot;","block_context":{"text":"Mac OS","link":"https:\/\/pixert.com\/blog\/category\/mac-os\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/04\/appcleaner-300x222.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":98,"url":"https:\/\/pixert.com\/blog\/wordpress-which-privileges-are-needed-by-mysql-database-user\/","url_meta":{"origin":46,"position":3},"title":"WordPress: Which privileges are needed by MySQL Database User","author":"Pixel Insert \/ Pixert","date":"May 2, 2011","format":false,"excerpt":"The famous 5 minutes installation for WordPress state that: Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it Most installation instruction for WordPress on the web state that you can GRANT ALL PRIVILEGES to that\u2026","rel":"","context":"In &quot;cPanel&quot;","block_context":{"text":"cPanel","link":"https:\/\/pixert.com\/blog\/category\/cpanel\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/05\/mysqlwp.jpg?fit=523%2C368&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":110,"url":"https:\/\/pixert.com\/blog\/how-to-delete-or-remove-a-local-git-repo-repository\/","url_meta":{"origin":46,"position":4},"title":"How to delete or remove a local Git repo (repository)","author":"Pixel Insert \/ Pixert","date":"May 22, 2011","format":false,"excerpt":"If you want to delete everything (.git folder, files and folders), just delete the whole directory Mac OSX Open Terminal and run the following [bash] rm -rf directoryname [\/bash] Windows Right-click the folder and choose Delete. It will goes to Recycle bin Note: this works for Git Clone and Git\u2026","rel":"","context":"In &quot;Mac OS&quot;","block_context":{"text":"Mac OS","link":"https:\/\/pixert.com\/blog\/category\/mac-os\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/04\/githeader.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":201,"url":"https:\/\/pixert.com\/blog\/remove-wordpress-revisions\/","url_meta":{"origin":46,"position":5},"title":"Remove WordPress Revisions","author":"Pixel Insert \/ Pixert","date":"February 16, 2012","format":false,"excerpt":"WordPress Posts Revisions are useful especially in the case of a multi author blog. However, There is a cost to having all these saved revisions of your posts in the aspect of database entries. Instead of having a single MySQL database record for your post you will have multiple records\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/51"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}