Forum Moderators: coopster
I need to create a script that will perform a "1 click install" of another script.
The install requires:
-create MySQL database and user - assign "all" privleges
-copy script into user's home directory
-populate database with data
-create config.php file with database user/pass etc...
Any ideas about how I can tackle this one?
Thanks!
Erik
well then making a shell script would work
you should look up shell scripting but essentially you are issuing the same commands you would from the command line. So go through the process from the command line and paste everything you put in into a text file and at least that will tell you what steps there are in the process.
you would probably have to create files to pipe in for the various commands, have you used a dump from mysql before? same premise
mysql -h hostname -u username -p databasename < /path/to/file.sql
some of those aren't always required, especially if you are creating the db and if the hostname is localhost you can leave that out as well
you do have to input the pass after that, then it just goes