<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=MySQL_local_script_installer</id>
	<title>MySQL local script installer - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=MySQL_local_script_installer"/>
	<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=MySQL_local_script_installer&amp;action=history"/>
	<updated>2026-04-27T10:09:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=MySQL_local_script_installer&amp;diff=13470&amp;oldid=prev</id>
		<title>Alx5962 at 15:43, 10 October 2007</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=MySQL_local_script_installer&amp;diff=13470&amp;oldid=prev"/>
		<updated>2007-10-10T15:43:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;â† Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:43, 10 October 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l198&quot;&gt;Line 198:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 198:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/highlight-nsis&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/highlight-nsis&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Code Examples]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key n22049_wiki-wiki_:diff::1.12:old-13469:rev-13470 --&gt;
&lt;/table&gt;</summary>
		<author><name>Alx5962</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=MySQL_local_script_installer&amp;diff=13469&amp;oldid=prev</id>
		<title>Alx5962 at 15:37, 10 October 2007</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=MySQL_local_script_installer&amp;diff=13469&amp;oldid=prev"/>
		<updated>2007-10-10T15:37:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;â† Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:37, 10 October 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l100&quot;&gt;Line 100:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* And now the InstallOption file  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* And now the InstallOption file &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;called &amp;#039;custom.ini&amp;#039; :&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key n22049_wiki-wiki_:diff::1.12:old-13468:rev-13469 --&gt;
&lt;/table&gt;</summary>
		<author><name>Alx5962</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=MySQL_local_script_installer&amp;diff=13468&amp;oldid=prev</id>
		<title>Alx5962 at 15:36, 10 October 2007</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=MySQL_local_script_installer&amp;diff=13468&amp;oldid=prev"/>
		<updated>2007-10-10T15:36:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
This is a small utility I made to import sql files to local MySQL 4.1 servers, as I have to do this on many machines.&lt;br /&gt;
It&amp;#039;s a stripped down version as others stuffs were too specifics to my needs but this version works fine too.&lt;br /&gt;
&lt;br /&gt;
Basically, the script checks if no error is returned (like wrong password) and continues if it&amp;#039;s ok. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name &amp;quot;MySQL script Installation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Var folder&lt;br /&gt;
var source&lt;br /&gt;
Var login&lt;br /&gt;
Var password&lt;br /&gt;
Var createdb&lt;br /&gt;
Var errorsrc&lt;br /&gt;
&lt;br /&gt;
!define DBNAME mydatabase&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Included files&lt;br /&gt;
!include MUI2.nsh&lt;br /&gt;
!include InstallOptions.nsh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OutFile InstallSQLScript.exe&lt;br /&gt;
CRCCheck on&lt;br /&gt;
XPStyle on &lt;br /&gt;
&lt;br /&gt;
ShowInstDetails show&lt;br /&gt;
&lt;br /&gt;
BrandingText &amp;quot;MYSQL import - alx5962&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Page custom GetInfos &amp;quot;&amp;quot; &amp;quot;: Information page&amp;quot;&lt;br /&gt;
!insertmacro MUI_PAGE_INSTFILES&lt;br /&gt;
!insertmacro MUI_LANGUAGE English&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function .onInit &lt;br /&gt;
    InitPluginsDir&lt;br /&gt;
    !insertmacro INSTALLOPTIONS_EXTRACT &amp;quot;custom.ini&amp;quot;    &lt;br /&gt;
    !insertmacro INSTALLOPTIONS_WRITE &amp;quot;custom.ini&amp;quot; &amp;quot;Field 10&amp;quot; &amp;quot;State&amp;quot; &amp;quot;${DBNAME}&amp;quot;&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
Section -Main&lt;br /&gt;
    ReadINIStr $folder &amp;quot;$PLUGINSDIR\custom.ini&amp;quot; &amp;quot;Field 2&amp;quot; &amp;quot;State&amp;quot; &lt;br /&gt;
    ReadINIStr $source &amp;quot;$PLUGINSDIR\custom.ini&amp;quot; &amp;quot;Field 4&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
    ReadINIStr $login &amp;quot;$PLUGINSDIR\custom.ini&amp;quot; &amp;quot;Field 6&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
    ReadINIStr $password &amp;quot;$PLUGINSDIR\custom.ini&amp;quot; &amp;quot;Field 8&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
    ReadINIStr $createdb &amp;quot;$PLUGINSDIR\custom.ini&amp;quot; &amp;quot;Field 9&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
    ExecWait &amp;#039;&amp;quot;$folder\bin\mysql&amp;quot; --user=$login --password=$password --execute=&amp;quot;SHOW DATABASES;&amp;quot;&amp;#039; $0&lt;br /&gt;
    StrCmp $0 1 0 +4&lt;br /&gt;
    StrCpy $errorsrc &amp;quot;Wrong login or password&amp;quot;&lt;br /&gt;
    Goto abortinst&lt;br /&gt;
    &lt;br /&gt;
    DetailPrint &amp;quot;Running import&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    StrCmp $createdb 1 createdbs importdbs&lt;br /&gt;
    &lt;br /&gt;
    createdbs:&lt;br /&gt;
    DetailPrint &amp;quot;Creating database&amp;quot;&lt;br /&gt;
    ExecWait &amp;#039;&amp;quot;$folder\bin\mysql&amp;quot; --user=$login --password=$password --execute=&amp;quot;CREATE DATABASE ${DBNAME}&amp;quot;&amp;#039; $1&lt;br /&gt;
    StrCmp $1 1 0 +4&lt;br /&gt;
    StrCpy $errorsrc &amp;quot;Unable to create database&amp;quot;&lt;br /&gt;
    Goto abortinst    &lt;br /&gt;
    &lt;br /&gt;
    importdbs:&lt;br /&gt;
    DetailPrint &amp;quot;SQL file import&amp;quot;&lt;br /&gt;
    ExecWait &amp;#039;&amp;quot;$folder\bin\mysql&amp;quot; --user=$login --password=$password --execute=&amp;quot;source $source&amp;quot; ${DBNAME}&amp;#039; $2&lt;br /&gt;
    StrCmp $2 1 0 endinst&lt;br /&gt;
    StrCpy $errorsrc &amp;quot;File import error&amp;quot;&lt;br /&gt;
    Goto abortinst    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    abortinst:&lt;br /&gt;
    DetailPrint &amp;quot;                         &amp;quot;  &lt;br /&gt;
    DetailPrint &amp;quot;$\n An error occured ! $\n&amp;quot;&lt;br /&gt;
    DetailPrint &amp;quot;  $errorsrc              &amp;quot;&lt;br /&gt;
    DetailPrint &amp;quot;                         &amp;quot;&lt;br /&gt;
        &lt;br /&gt;
    endinst:&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Function GetInfos &lt;br /&gt;
    !insertmacro MUI_HEADER_TEXT &amp;quot;Database informations&amp;quot; &amp;quot;Database informations - please fill all elements&amp;quot;&lt;br /&gt;
    !insertmacro INSTALLOPTIONS_DISPLAY &amp;quot;custom.ini&amp;quot;&lt;br /&gt;
FunctionEnd&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* And now the InstallOption file &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[Settings]&lt;br /&gt;
NumFields=10&lt;br /&gt;
CancelEnabled=1&lt;br /&gt;
Title=Page information&lt;br /&gt;
CancelShow=1&lt;br /&gt;
BackEnabled=1&lt;br /&gt;
&lt;br /&gt;
[Field 1]&lt;br /&gt;
Type=Label&lt;br /&gt;
Text=MySQL folder&lt;br /&gt;
Left=16&lt;br /&gt;
Right=120&lt;br /&gt;
Top=7&lt;br /&gt;
Bottom=15&lt;br /&gt;
&lt;br /&gt;
[Field 2]&lt;br /&gt;
Type=DirRequest&lt;br /&gt;
Left=16&lt;br /&gt;
Top=19&lt;br /&gt;
Right=138&lt;br /&gt;
Bottom=32&lt;br /&gt;
State=C:\&lt;br /&gt;
MinLen=3&lt;br /&gt;
Root=C:\&lt;br /&gt;
&lt;br /&gt;
[Field 3]&lt;br /&gt;
Type=Label&lt;br /&gt;
Left=16&lt;br /&gt;
Top=73&lt;br /&gt;
Right=112&lt;br /&gt;
Bottom=82&lt;br /&gt;
Text=MySQL login&lt;br /&gt;
&lt;br /&gt;
[Field 4]&lt;br /&gt;
Type=FileRequest&lt;br /&gt;
Left=16&lt;br /&gt;
Top=52&lt;br /&gt;
Right=283&lt;br /&gt;
Bottom=65&lt;br /&gt;
MinLen=3&lt;br /&gt;
Flags=FILE_MUST_EXIST|PATH_MUST_EXIST&lt;br /&gt;
&lt;br /&gt;
[Field 5]&lt;br /&gt;
Type=Label&lt;br /&gt;
Left=15&lt;br /&gt;
Top=39&lt;br /&gt;
Right=138&lt;br /&gt;
Bottom=48&lt;br /&gt;
Text=SQL file&lt;br /&gt;
&lt;br /&gt;
[Field 6]&lt;br /&gt;
Type=Text&lt;br /&gt;
Left=16&lt;br /&gt;
Top=87&lt;br /&gt;
Right=138&lt;br /&gt;
Bottom=100&lt;br /&gt;
State=root&lt;br /&gt;
&lt;br /&gt;
[Field 7]&lt;br /&gt;
Type=Label&lt;br /&gt;
Left=161&lt;br /&gt;
Top=73&lt;br /&gt;
Right=273&lt;br /&gt;
Bottom=82&lt;br /&gt;
Text=MySQL password&lt;br /&gt;
&lt;br /&gt;
[Field 8]&lt;br /&gt;
Type=Password&lt;br /&gt;
Left=161&lt;br /&gt;
Top=87&lt;br /&gt;
Right=283&lt;br /&gt;
Bottom=100&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[Field 9]&lt;br /&gt;
Type=CheckBox&lt;br /&gt;
Left=16&lt;br /&gt;
Top=116&lt;br /&gt;
Right=97&lt;br /&gt;
Bottom=126&lt;br /&gt;
Text=&amp;quot; Create database :&amp;quot;&lt;br /&gt;
State=1&lt;br /&gt;
&lt;br /&gt;
[Field 10]&lt;br /&gt;
Type=Text&lt;br /&gt;
Left=105&lt;br /&gt;
Top=115&lt;br /&gt;
Right=193&lt;br /&gt;
Bottom=128&lt;br /&gt;
Flags=READONLY&lt;br /&gt;
State=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alx5962</name></author>
	</entry>
</feed>