This has being driving me mad for the entire morning – I wanted to try using some of the field arguments in drush for drupal 7 and while I was at it I tried to automate the site-install, I have never used it before as Ive always used the browser for the installation

After the morning I couldnt get site-install to work without the process being interrupted with one error or another

After a lot of looking at forums I finally distilled my command to

drush site-install standard --db-url=mysql://admin:admin@localhost/virdb --debug

but this generated an error as follows stating that my username and password is incorrect I know that they are right – to prove the point I installed through the browser and reran the statement

drush site-install standard --db-url=mysql://admin:admin@localhost/virdb --debug

and this time it worked – output statement added at the bottom – so what gives what is the correct means of calling drush site-install and what Im I missing


ms@ms-laptop:/var/www/vir$ drush site-install standard --db-url=mysql://admin:admin@localhost/virdb --debug

Bootstrap to phase 1. [0.05 sec, 3.37 MB]                                                                                                        [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.05 sec, 3.37 MB]                                                                       [bootstrap]

Initialized Drupal 7.0 root directory at /var/www/vir [0.07 sec, 4.33 MB]                                                                           [notice]

Found command: site-install (commandfile=core) [0.07 sec, 4.33 MB]                                                                               [bootstrap]

Initializing drush commandfile: drush_make [0.07 sec, 4.33 MB]                                                                                   [bootstrap]

Initializing drush commandfile: drush_make_d_o [0.07 sec, 4.33 MB]                                                                               [bootstrap]

Initializing drush commandfile: user [0.07 sec, 4.34 MB]                                                                                         [bootstrap]

You are about to DROP your 'virdb' database and then CREATE a new one. Do you want to continue? (y/n): y

Sites directory sites/default already exists - proceeding. [1.62 sec, 4.35 MB]                                                                      [notice]

Drush bootstrap phase : _drush_bootstrap_drupal_site() [1.62 sec, 4.35 MB]                                                                       [bootstrap]

Initialized Drupal site default at sites/default [1.62 sec, 4.35 MB]                                                                                [notice]

Calling system(mysql  -hlocalhost -uadmin -padmin information_schema -e  "DROP DATABASE IF EXISTS virdb")

Calling system(mysql  -hlocalhost -uadmin -padmin information_schema -e "CREATE DATABASE virdb")

Starting Drupal installation. This takes 30 seconds or so ... [1.66 sec, 4.65 MB]                                                                [ok]

WD php: Exception: Database name field is required.                                                                                              [error]

Database username field is required.

In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with

configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your

hosting provider.Failed to connect to your database server. The server reports the following message: SQLSTATE[28000] [1045] Access denied for

user 'ms'@'localhost' (using password: NO).Is the database server running?Does the database exist, and have you entered the

correct database name?Have you entered the correct username and password?Have you entered the correct database hostname? in install_run_task()

(line 418 of /var/www/vir/includes/install.core.inc). [1.95 sec, 10.52 MB]

WD php: Warning: Cannot modify header information - headers already sent by (output started at /opt/drush/includes/drush.inc:871) in             [warning]

drupal_send_headers() (line 1040 of /var/www/vir/includes/bootstrap.inc). [1.95 sec, 10.54 MB]

Exception: Database name field is required.

Database username field is required.

<p>In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the <a href="http://drupal.org/getting-started/install">installation handbook</a>. If you are unsure what any of this means you should probably contact your hosting provider.</p><p class="error">Failed to connect to your database server. The server reports the following message: <em>SQLSTATE[28000] [1045] Access denied for user &#039;ms&#039;@&#039;localhost&#039; (using password: NO)</em>.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul></p> in install_run_task() (line 418 of /var/www/vir/includes/install.core.inc).

Drush command could not be completed. [1.95 sec, 10.52 MB]                                                                                       [error]

ms@ms-laptop:/var/www/vir$ drush site-install standard --db-url=mysql://admin:admin@localhost/virdb --debug

Bootstrap to phase 1. [0.05 sec, 3.37 MB]                                                                                                        [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.05 sec, 3.37 MB]                                                                       [bootstrap]

Initialized Drupal 7.0 root directory at /var/www/vir [0.07 sec, 4.33 MB]                                                                           [notice]

Found command: site-install (commandfile=core) [0.07 sec, 4.33 MB]                                                                               [bootstrap]

Initializing drush commandfile: drush_make [0.07 sec, 4.33 MB]                                                                                   [bootstrap]

Initializing drush commandfile: drush_make_d_o [0.07 sec, 4.33 MB]                                                                               [bootstrap]

Initializing drush commandfile: user [0.07 sec, 4.34 MB]                                                                                         [bootstrap]

You are about to DROP your 'virdb' database and then CREATE a new one. Do you want to continue? (y/n): 

You are about to DROP your 'virdb' database and then CREATE a new one. Do you want to continue? (y/n): y

Sites directory sites/default already exists - proceeding. [2.33 sec, 4.35 MB]                                                                      [notice]

Drush bootstrap phase : _drush_bootstrap_drupal_site() [2.33 sec, 4.35 MB]                                                                       [bootstrap]

Initialized Drupal site default at sites/default [2.33 sec, 4.35 MB]                                                                                [notice]

Calling system(mysql  -hlocalhost -uadmin -padmin information_schema -e  "DROP DATABASE IF EXISTS virdb")

Calling system(mysql  -hlocalhost -uadmin -padmin information_schema -e "CREATE DATABASE virdb")

Starting Drupal installation. This takes 30 seconds or so ... [2.37 sec, 4.65 MB]                                                                [ok]

WD php: Exception: Database name field is required.                                                                                              [error]

Database username field is required.

In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with

configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your

hosting provider.Failed to connect to your database server. The server reports the following message: SQLSTATE[28000] [1045] Access denied for

user &#039;ms&#039;@&#039;localhost&#039; (using password: NO).Is the database server running?Does the database exist, and have you entered the

correct database name?Have you entered the correct username and password?Have you entered the correct database hostname? in install_run_task()

(line 418 of /var/www/vir/includes/install.core.inc). [2.66 sec, 10.52 MB]

WD php: Warning: Cannot modify header information - headers already sent by (output started at /opt/drush/includes/drush.inc:871) in             [warning]

drupal_send_headers() (line 1040 of /var/www/vir/includes/bootstrap.inc). [2.66 sec, 10.54 MB]

Exception: Database name field is required.

Database username field is required.

<p>In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the <a href="http://drupal.org/getting-started/install">installation handbook</a>. If you are unsure what any of this means you should probably contact your hosting provider.</p><p class="error">Failed to connect to your database server. The server reports the following message: <em>SQLSTATE[28000] [1045] Access denied for user &#039;ms&#039;@&#039;localhost&#039; (using password: NO)</em>.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul></p> in install_run_task() (line 418 of /var/www/vir/includes/install.core.inc).

Drush command could not be completed. [2.66 sec, 10.52 MB]          


ms@ms-laptop:/var/www/vir$ drush site-install standard --db-url=mysql://admin:admin@localhost/virdb --debug

Bootstrap to phase 1. [0.05 sec, 3.37 MB]                                                                                                        [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.05 sec, 3.37 MB]                                                                       [bootstrap]

Initialized Drupal 7.0 root directory at /var/www/vir [0.07 sec, 4.33 MB]                                                                           [notice]

Found command: site-install (commandfile=core) [0.07 sec, 4.33 MB]                                                                               [bootstrap]

Initializing drush commandfile: drush_make [0.07 sec, 4.33 MB]                                                                                   [bootstrap]

Initializing drush commandfile: drush_make_d_o [0.07 sec, 4.33 MB]                                                                               [bootstrap]

Initializing drush commandfile: user [0.07 sec, 4.34 MB]                                                                                         [bootstrap]

You are about to DROP your 'virdb' database and then CREATE a new one. Do you want to continue? (y/n): y

Sites directory sites/default already exists - proceeding. [4.52 sec, 4.35 MB]                                                                      [notice]

Drush bootstrap phase : _drush_bootstrap_drupal_site() [4.52 sec, 4.35 MB]                                                                       [bootstrap]

Initialized Drupal site default at sites/default [4.52 sec, 4.35 MB]                                                                                [notice]

Calling system(mysql  -hlocalhost -uadmin -padmin information_schema -e  "DROP DATABASE IF EXISTS virdb")

Calling system(mysql  -hlocalhost -uadmin -padmin information_schema -e "CREATE DATABASE virdb")

Starting Drupal installation. This takes 30 seconds or so ... [9.19 sec, 4.65 MB]                                                                [ok]

WD system: user module installed. [16.23 sec, 10.92 MB]                                                                                               [info]

WD system: user module enabled. [16.23 sec, 10.92 MB]                                                                                                 [info]

WD system: filter module installed. [18.26 sec, 12.92 MB]                                                                                             [info]

WD system: filter module enabled. [18.26 sec, 12.92 MB]                                                                                               [info]

WD system: node module installed. [19.52 sec, 13.61 MB]                                                                                               [info]

WD system: node module enabled. [19.52 sec, 13.61 MB]                                                                                                 [info]

WD system: field_sql_storage module installed. [19.96 sec, 13.76 MB]                                                                                  [info]

WD system: field_sql_storage module enabled. [19.96 sec, 13.76 MB]                                                                                    [info]

WD system: field module installed. [20.89 sec, 14.52 MB]                                                                                              [info]

WD system: field module enabled. [20.89 sec, 14.52 MB]                                                                                                [info]

WD system: text module installed. [21.37 sec, 14.62 MB]                                                                                               [info]

WD system: text module enabled. [21.37 sec, 14.62 MB]                                                                                                 [info]

WD field: Updating field type text with module text. [21.37 sec, 14.63 MB]                                                                          [notice]

WD field: Updating field type text_long with module text. [21.38 sec, 14.63 MB]                                                                     [notice]

WD field: Updating field type text_with_summary with module text. [21.38 sec, 14.63 MB]                                                             [notice]

WD system: block module installed. [22.5 sec, 14.82 MB]                                                                                               [info]

WD system: block module enabled. [22.5 sec, 14.82 MB]                                                                                                 [info]

WD system: color module installed. [23.03 sec, 14.99 MB]                                                                                              [info]

WD system: color module enabled. [23.03 sec, 14.99 MB]                                                                                                [info]

WD system: comment module installed. [23.88 sec, 15.49 MB]                                                                                            [info]

WD system: comment module enabled. [23.88 sec, 15.49 MB]                                                                                              [info]

WD system: contextual module installed. [24.32 sec, 15.51 MB]                                                                                         [info]

WD system: contextual module enabled. [24.32 sec, 15.52 MB]                                                                                           [info]

WD system: dashboard module installed. [24.84 sec, 15.64 MB]                                                                                          [info]

WD system: dashboard module enabled. [24.84 sec, 15.64 MB]                                                                                            [info]

WD system: dblog module installed. [25.53 sec, 15.69 MB]                                                                                              [info]

WD system: dblog module enabled. [25.6 sec, 15.69 MB]                                                                                                 [info]

WD system: field_ui module installed. [26.48 sec, 15.77 MB]                                                                                           [info]

WD system: field_ui module enabled. [26.56 sec, 15.77 MB]                                                                                             [info]

WD system: file module installed. [27.23 sec, 16.11 MB]                                                                                               [info]

WD system: file module enabled. [27.3 sec, 16.12 MB]                                                                                                  [info]

WD field: Updating field type file with module file. [27.37 sec, 16.12 MB]                                                                          [notice]

WD system: options module installed. [27.96 sec, 16.18 MB]                                                                                            [info]

WD system: options module enabled. [28.02 sec, 16.18 MB]                                                                                              [info]

WD system: taxonomy module installed. [29.14 sec, 16.52 MB]                                                                                           [info]

WD system: taxonomy module enabled. [29.21 sec, 16.52 MB]                                                                                             [info]

WD field: Updating field type taxonomy_term_reference with module taxonomy. [29.29 sec, 16.52 MB]                                                   [notice]

WD system: help module installed. [29.87 sec, 16.54 MB]                                                                                               [info]

WD system: help module enabled. [29.94 sec, 16.54 MB]                                                                                                 [info]

WD file: The file permissions could not be set on public://styles. [30.93 sec, 16.83 MB]                                                         [error]

WD system: image module installed. [31 sec, 16.83 MB]                                                                                                 [info]

WD system: image module enabled. [31.07 sec, 16.83 MB]                                                                                                [info]

WD field: Updating field type image with module image. [31.15 sec, 16.84 MB]                                                                        [notice]

WD system: list module installed. [31.75 sec, 16.92 MB]                                                                                               [info]

WD system: list module enabled. [31.81 sec, 16.93 MB]                                                                                                 [info]

WD field: Updating field type list_integer with module list. [31.9 sec, 16.94 MB]                                                                   [notice]

WD field: Updating field type list_float with module list. [31.98 sec, 16.94 MB]                                                                    [notice]

WD field: Updating field type list_text with module list. [32.07 sec, 16.94 MB]                                                                     [notice]

WD field: Updating field type list_boolean with module list. [32.14 sec, 16.94 MB]                                                                  [notice]

WD system: menu module installed. [33.38 sec, 17.07 MB]                                                                                               [info]

WD system: menu module enabled. [36.8 sec, 18.35 MB]                                                                                                  [info]

WD system: number module installed. [37.67 sec, 18.43 MB]                                                                                             [info]

WD system: number module enabled. [37.73 sec, 18.43 MB]                                                                                               [info]

WD field: Updating field type number_integer with module number. [37.82 sec, 18.44 MB]                                                              [notice]

WD field: Updating field type number_decimal with module number. [37.91 sec, 18.45 MB]                                                              [notice]

WD field: Updating field type number_float with module number. [38 sec, 18.45 MB]                                                                   [notice]

WD system: overlay module installed. [38.56 sec, 18.56 MB]                                                                                            [info]

WD system: overlay module enabled. [38.63 sec, 18.56 MB]                                                                                              [info]

WD system: path module installed. [39.26 sec, 18.63 MB]                                                                                               [info]

WD system: path module enabled. [39.33 sec, 18.63 MB]                                                                                                 [info]

WD system: rdf module installed. [40.11 sec, 18.76 MB]                                                                                                [info]

WD system: rdf module enabled. [40.17 sec, 18.76 MB]                                                                                                  [info]

WD system: search module installed. [41.38 sec, 18.99 MB]                                                                                             [info]

WD system: search module enabled. [41.44 sec, 18.99 MB]                                                                                               [info]

WD system: shortcut module installed. [42.62 sec, 19.1 MB]                                                                                            [info]

WD system: shortcut module enabled. [42.68 sec, 19.1 MB]                                                                                              [info]

WD system: toolbar module installed. [43.26 sec, 19.16 MB]                                                                                            [info]

WD system: toolbar module enabled. [43.33 sec, 19.16 MB]                                                                                              [info]

WD system: standard module installed. [55.99 sec, 21.49 MB]                                                                                           [info]

WD system: standard module enabled. [56.06 sec, 21.49 MB]                                                                                             [info]

WD actions: Action 'Publish comment' added. [58.35 sec, 21.27 MB]                                                                                   [notice]

WD actions: Action 'Unpublish comment' added. [58.51 sec, 21.27 MB]                                                                                 [notice]

WD actions: Action 'Save comment' added. [58.65 sec, 21.27 MB]                                                                                      [notice]

WD actions: Action 'Publish content' added. [58.8 sec, 21.27 MB]                                                                                    [notice]

WD actions: Action 'Unpublish content' added. [58.94 sec, 21.28 MB]                                                                                 [notice]

WD actions: Action 'Make content sticky' added. [59.09 sec, 21.28 MB]                                                                               [notice]

WD actions: Action 'Make content unsticky' added. [59.42 sec, 21.28 MB]                                                                             [notice]

WD actions: Action 'Promote content to front page' added. [59.69 sec, 21.28 MB]                                                                     [notice]

WD actions: Action 'Remove content from front page' added. [59.84 sec, 21.28 MB]                                                                    [notice]

WD actions: Action 'Save content' added. [60 sec, 21.28 MB]                                                                                         [notice]

WD actions: Action 'Ban IP address of current user' added. [60.15 sec, 21.28 MB]                                                                    [notice]

WD actions: Action 'Block current user' added. [60.31 sec, 21.28 MB]                                                                                [notice]

WD system: update module installed. [67.48 sec, 22.79 MB]                                                                                             [info]

WD system: update module enabled. [67.54 sec, 22.79 MB]                                                                                               [info]

WD user: Session opened for admin. [67.98 sec, 23.05 MB]                                                                                            [notice]

WD cron: Cron run completed. [80.87 sec, 22.88 MB]                                                                                                  [notice]

All necessary changes to sites/default and sites/default/settings.php have been made, so you should remove write permissions to them now in order[warning]

to avoid security risks. If you are unsure how to do so, consult the online handbook. [81.02 sec, 22.87 MB]

Command dispatch complete [81.02 sec, 22.86 MB]                                                                                                     [notice]

 Timer  Cum (sec)  Count  Avg (msec) 

 page   71.831     1      71831.02   


only one error occurred
The file permissions could not be set on public://styles.

Comments

greg.1.anderson’s picture

Version: All-versions-4.x-dev » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.