0

I have read tutorials and drushcommands site, but I'm missing something...

My desired info is as follows:

  • Database name: scratch
  • Database username: scratch
  • Database password: 1
  • Account name: scratch (admin login?)
  • Account password: 1 (admin password?)
  • Site in English

I have the username set up in PHP my admin, desired website URL is localhost/scratch

My Drush command is:

drush dl drupal-7.x
drush site-install --db-su:scratch --db-su-pw:1 --account-name:scratch
--account-pass:1 --account-mail:[email protected] --locale:EN 

Am I missing something? I'm getting these errors:

e:\xampp-portable\htdocs>drush site-install --db-su:scratch --db-su-pw:1 --account-name:scratch --account-pass:1 --account-mail:[email protected] --locale:EN

Command site-install needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.

The drush command 'site-install' could not be executed. [error]

2 Answers 2

2

Use this command to install Drupal.

drush site-install standard --db-url="mysql://scratch:1@localhost/scratch" --account-name=scratch --account-pass=1 --account-mail="[email protected]"

Note: Move to the folder drupal-7.x folder and run this command from there. This command should be run from the place where your drupal files are located. It would be better just to rename it drupal instead of drupal-7.x for easiness. I tested it right now and its working.

6
  • This worked perfectly, is there a way to "link" the commands in sequence, something like && so I can install drupal and set it up in one command LINE? Commented Sep 23, 2015 at 15:32
  • Additionally...is there a Drush command to create the phpmyadmin database username and password? Commented Sep 23, 2015 at 15:35
  • 1
    Drush has control over Drupal and performs drupal related activities using command line. If you want to do Database related activities. Just open a cmd and type 'CREATE DATABASE mydb;' and ´CREATE USER 'rashid'@'localhost' IDENTIFIED BY PASSWORD test123´ You can create users or databases in just a few seconds
    – rashidkhan
    Commented Sep 23, 2015 at 17:19
  • I opened cmd: typed in e: then 'cd E:\xampp-portable\mysql' then 'CREATE DATABASE mydb;' not working for me ;( What path should I enter into command line before entering the commands? Windows 7 Ultimate 64 bit, Xammp localhost Commented Sep 24, 2015 at 0:42
  • If you're using windows then go to C:\xampp\mysql\bin for xampp or C:\wamp\bin\mysql\mysql5.6.12\bin for wamp and add this path to your System path settings. Then it will work for you.
    – rashidkhan
    Commented Sep 24, 2015 at 0:46
1

Separate your option values with '=' rather than ':'.

1
  • The Drush command site: drushcommands.com/drush-6x/core/site-install says: " --account-name : uid1 name. Defaults to admin" , I take it that : should be replaced by = , so " --account-name : uid1 name. Defaults to admin" should be " --account-name=uid1 name. Defaults to admin" confusing for beginners Commented Sep 23, 2015 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.