drush sql-connectfor drush 8x


A string for connecting to the DB.

drush sql-connect

  • Options


    sql-connect accepts 4 option/s:


    --database : The DB connection key if using multiple connections in settings.php.

    --target : The name of a target within the specified database connection. Defaults to 'default'.

    --db-url : A Drupal 6 style database URL.

    --extra : Add custom options to the connect string.

  • Examples


    Bash: Import SQL statements from a file into the current database.

    `drush sql-connect` < example.sql

    Fish: Import SQL statements from a file into the current database.

    eval (drush sql-connect) < example.sql

  • Comments


    comments powered by Disqus