reset-mysql-password.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <!-- Always force latest IE rendering engine or request Chrome Frame -->
  6. <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  8. <!-- Use title if it's in the page YAML frontmatter -->
  9. <title>Reset the MySQL/MariaDB Root Password</title>
  10. <link href="/dashboard/stylesheets/normalize.css" rel="stylesheet" type="text/css" /><link href="/dashboard/stylesheets/all.css" rel="stylesheet" type="text/css" />
  11. <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  12. <script src="/dashboard/javascripts/modernizr.js" type="text/javascript"></script>
  13. <link href="/dashboard/images/favicon.png" rel="icon" type="image/png" />
  14. </head>
  15. <body class="docs docs_reset-mysql-password">
  16. <div id="fb-root"></div>
  17. <script>(function(d, s, id) {
  18. var js, fjs = d.getElementsByTagName(s)[0];
  19. if (d.getElementById(id)) return;
  20. js = d.createElement(s); js.id = id;
  21. js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=277385395761685";
  22. fjs.parentNode.insertBefore(js, fjs);
  23. }(document, 'script', 'facebook-jssdk'));</script>
  24. <div class="contain-to-grid">
  25. <nav class="top-bar" data-topbar>
  26. <ul class="title-area">
  27. <li class="name">
  28. <h1><a href="/dashboard/index.html">Apache Friends</a></h1>
  29. </li>
  30. <li class="toggle-topbar menu-icon">
  31. <a href="#">
  32. <span>Menu</span>
  33. </a>
  34. </li>
  35. </ul>
  36. <section class="top-bar-section">
  37. <!-- Right Nav Section -->
  38. <ul class="right">
  39. <li class=""><a href="/applications.html">Applications</a></li>
  40. <li class=""><a href="/dashboard/faq.html">FAQs</a></li>
  41. <li class="active"><a href="/dashboard/howto.html">HOW-TO Guides</a></li>
  42. <li class=""><a target="_blank" href="/dashboard/phpinfo.php">PHPInfo</a></li>
  43. <li class=""><a href="/phpmyadmin/">phpMyAdmin</a></li>
  44. </ul>
  45. </section>
  46. </nav>
  47. </div>
  48. <div id="wrapper">
  49. <div class="hero">
  50. <div class="row">
  51. <div class="large-12 columns">
  52. <h1>Documentation</h1>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="row">
  57. <div class="large-12 columns">
  58. <ul class="sub-nav">
  59. <li>
  60. <a class="pdf" target="_blank" href="/dashboard/docs/reset-mysql-password.pdf"> Download PDF
  61. <span>reset-mysql-password.pdf</span>
  62. </a> </li>
  63. </ul>
  64. <article class="asciidoctor">
  65. <h1>Reset the MySQL/MariaDB Root Password</h1>
  66. <div class="paragraph">
  67. <p>By default, the MySQL/MariaDB installation that ships with XAMPP has an empty root password. This is a serious security risk, especially if you plan to use XAMPP in production scenarios.</p>
  68. </div>
  69. <div class="paragraph">
  70. <p>To change the MySQL/MariaDB root password, follow these steps:</p>
  71. </div>
  72. <div class="olist arabic">
  73. <ol class="arabic">
  74. <li>
  75. <p>Ensure that the MySQL/MariaDB server is running.</p>
  76. </li>
  77. <li>
  78. <p>Open your Windows command prompt by clicking the "Shell" button in the XAMPP control panel.</p>
  79. <div class="imageblock">
  80. <div class="content">
  81. <img src="./images/reset-mysql-password/image1.png" alt="image1">
  82. </div>
  83. </div>
  84. </li>
  85. <li>
  86. <p>Use the <em>mysqladmin</em> command-line utility to alter the MySQL/MariaDB password, using the following syntax:</p>
  87. <div class="literalblock">
  88. <div class="content">
  89. <pre>mysqladmin --user=root password "newpassword"</pre>
  90. </div>
  91. </div>
  92. <div class="paragraph">
  93. <p>For example, to change the MySQL/MariaDB root password from its default empty value to the password <em>gue55me</em>, you would execute:</p>
  94. </div>
  95. <div class="literalblock">
  96. <div class="content">
  97. <pre>mysqladmin --user=root password "gue55me"</pre>
  98. </div>
  99. </div>
  100. <div class="imageblock">
  101. <div class="content">
  102. <img src="./images/reset-mysql-password/image2.png" alt="image2">
  103. </div>
  104. </div>
  105. <div class="paragraph">
  106. <p>Or, if a password has already been previously set and you&#8217;d like to change it to a new one, you can use the following syntax:</p>
  107. </div>
  108. <div class="literalblock">
  109. <div class="content">
  110. <pre>mysqladmin --user=root --password=oldpassword password "newpassword"</pre>
  111. </div>
  112. </div>
  113. <div class="paragraph">
  114. <p>For example, to change the root password from <em>12345</em> to <em>gue55me</em>, you would execute:</p>
  115. </div>
  116. <div class="literalblock">
  117. <div class="content">
  118. <pre>mysqladmin --user=root --password=12345 password "gue55me"</pre>
  119. </div>
  120. </div>
  121. </li>
  122. <li>
  123. <p>Test that your password change has been accepted, by attempting to connect to the MySQL/MariaDB server using the <em>mysql</em> command-line client in the same directory. For example, you could use the command below to connect to the server and return the results of a calculation:</p>
  124. <div class="literalblock">
  125. <div class="content">
  126. <pre>mysql --user=root --password=gue55me -e "SELECT 1+1"</pre>
  127. </div>
  128. </div>
  129. <div class="imageblock">
  130. <div class="content">
  131. <img src="./images/reset-mysql-password/image3.png" alt="image3">
  132. </div>
  133. </div>
  134. </li>
  135. </ol>
  136. </div>
  137. </article>
  138. </div>
  139. </div>
  140. </div>
  141. <footer>
  142. <div class="row">
  143. <div class="large-12 columns">
  144. <div class="row">
  145. <div class="large-8 columns">
  146. <ul class="social">
  147. <li class="twitter"><a href="https://twitter.com/apachefriends">Follow us on Twitter</a></li>
  148. <li class="facebook"><a href="https://www.facebook.com/we.are.xampp">Like us on Facebook</a></li>
  149. <li class="google"><a href="https://plus.google.com/+xampp/posts">Add us to your G+ Circles</a></li>
  150. </ul>
  151. <ul class="inline-list">
  152. <li><a href="https://www.apachefriends.org/blog.html">Blog</a></li>
  153. <li><a href="https://www.apachefriends.org/privacy_policy.html">Privacy Policy</a></li>
  154. <li>
  155. <a target="_blank" href="http://www.fastly.com/"> CDN provided by
  156. <img width="48" data-2x="/dashboard/images/fastly-logo@2x.png" src="/dashboard/images/fastly-logo.png" />
  157. </a> </li>
  158. </ul>
  159. </div>
  160. <div class="large-4 columns">
  161. <p class="text-right">Copyright (c) 2017, Apache Friends</p>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. </footer>
  167. <!-- JS Libraries -->
  168. <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
  169. <script src="/dashboard/javascripts/all.js" type="text/javascript"></script>
  170. </body>
  171. </html>