0540.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Portable MySQL USB Flash Install Guide</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="How To,Tutorial,i12bretro,MySQL,Database,Relational Database,Community Edition,USB,Flash Drive,Portable,Portable Software">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Portable MySQL USB Flash Install Guide">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Portable MySQL USB Flash Install Guide</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <ol>
  25. <li>Download MySQL Workbench <a href="https://dev.mysql.com/downloads/workbench/" target="_blank">Download</a></li>
  26. <li>Download the latest MySQL binary .zip <a href="https://dev.mysql.com/downloads/mysql/" target="_blank">Download</a></li>
  27. <li>Extract the downloaded .zip file</li>
  28. <li>Rename the extracted folder MySQL</li>
  29. <li>Cut the MySQL folder to the USB flash drive</li>
  30. <li>Navigate back to the folder with the MySQL Workbench .msi</li>
  31. <li>While holding Shift, right click in the whitespace &gt; Open PowerShell window here </li>
  32. <li>Run the following command in PowerShell to extract the .msi to the USB flash drive, update the drive letter as needed
  33. <div class="codeBlock PS">msiexec /a mysql-workbench-community-8.0.25-winx64.msi /qb TARGETDIR=H:\<br />
  34. exit</div>
  35. </li>
  36. <li>Navigate to the USB flash drive and create a new text file called MySQL.bat</li>
  37. <li>Paste the following contents into the .bat file
  38. <p>&quot;%~dp0MySQL\bin\mysqld.exe&quot; --standalone</p>
  39. </li>
  40. <li>Save MySQL.bat</li>
  41. <li>Navigate into \MySQL\bin on the USB flash drive</li>
  42. <li>While holding Shift, right click in the whitespace &gt; Open PowerShell window here</li>
  43. <li>Run the following command to initialize the MySQL server
  44. <div class="codeBlock PS">.\mysqld --initialize<br />
  45. exit</div>
  46. </li>
  47. <li>Find the .err file in the \MySQL\data directory and open it in a text editor</li>
  48. <li>Search for the phrase temporary password &gt; Copy the randomly generated password for the root account to the clipboard</li>
  49. <li>Right click MySQL.bat on the root of the USB flash drive &gt; Run as Administrator</li>
  50. <li>The MySQL server process is now running</li>
  51. <li>Navigate into \MySQL\MySQL Workbench 8.0 CE\ on the USB flash drive and launch MySQLWorkbench.exe</li>
  52. <li>Click the Plus icon next to MySQL Connections</li>
  53. <li>Enter a connection name (ie Portable MySQL) &gt; Click OK</li>
  54. <li>Double click the new connection</li>
  55. <li>Paste the password found in the .err file</li>
  56. <li>Enter and confirm a new root password</li>
  57. <li>The connection should be successful, click OK</li>
  58. <li>Welcome to a portable MySQL database instance with GUI</li>
  59. </ol>
  60. <p><em>To stop the MySQL instance, simply kill mysqld.exe by pressing CTRL+C in the open command prompt running MySQL.bat</em></p>
  61. <p><em>Additional server options for MySQL.bat <a href="https://dev.mysql.com/doc/refman/8.0/en/server-options.html" target="_blank">https://dev.mysql.com/doc/refman/8.0/en/server-options.html</a></em></p>
  62. </div>
  63. </div>
  64. </body>
  65. </html>