Archive: SQL Stuff!!


SQL Stuff!!
1. I need to know how to find out if the user has mysql 4.1 installed on there machine. If it is indeed installed then I do not want to show that section on the install, but if it isnt, then I would like to show that section as required.

2. I need to create a new database on the MYSQL server that was either just installed, or previously installed.

3. I need to execute 10 .SQL files that will affect the database that was just created. These files put in tables and values and such.

That is about it for now I belive, but I will post again later If I need something else. Im sorry if this sounded alittle upfront and demanding, but I have a headache and have been searching for a while.

Thanks in advance everybody!! :D

Arfy


There are some database scripts here:
http://nsis.sourceforge.net/archive/...instances=0,11

-Stu


To find out if mySQL 1.4 is installed, you'd probably have to check in the user's registry using ReadRegStr
To hide a section set the sections text to "" using SectionSetText. You must also unselect that section using the UnselectSection macro in !include Sections.nsh

-Stu


The link you gave me doesnt seem to deal with MYSQL, mainly with MS Access and MS SQL.

Thanks!


ONe of my programming friends told me about this command:

Exec C:\Program Files\MySQL\MySQL Server 4.1\bin\mysql.exe < "C:\Documents and Settings\Hess Smith\Desktop\SFR\installer\sam2\sql\tables.sql"

It doesnt work. Any ideas??


Exec only accepts one parameter. You're passing it 6. You need quotes around the whole lot:
Exec '"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysql.exe" < "C:\Documents and Settings\Hess Smith\Desktop\SFR\installer\sam2\sql\tables.sql"'

-Stu


OK that worked. The data didn't save I'm guessing because it didn't know what database to put it in. Now what I need is to depict what database (schema in Mysql Admin) it is to create that in. I dont know if I also need to say my database login details in their as well...but ya.

Later on in the process of making my installer I am going to have to make a custom page for them to enter their mysql login details and that kinda stuff.

Any and all help would be appreciated!
Thanks in advance,

Hess Smith