Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.
[preflight] Drush disables Xdebug by default. To override this, see https://www.drush.org/latest/commands/#xdebug
[preflight] Config paths: /svr/drupal.app/vendor/drush/drush/drush.yml
[preflight] Alias paths: /svr/drupal.app/web/drush/sites,/svr/drupal.app/drush/sites
[preflight] Commandfile search paths: /svr/drupal.app/vendor/drush/drush/src
[info] Starting bootstrap to root [0.52 sec, 5.17 MB]
[info] Drush bootstrap phase 1 [0.52 sec, 5.17 MB]
[info] Try to validate bootstrap phase 1 [0.52 sec, 5.17 MB]
[info] Try to validate bootstrap phase 1 [0.52 sec, 5.17 MB]
[info] Try to bootstrap at phase 1 [0.52 sec, 5.17 MB]
[info] Drush bootstrap phase: bootstrapDrupalRoot() [0.52 sec, 5.17 MB]
[info] Change working directory to /svr/drupal.app/web [0.52 sec, 5.17 MB]
[info] Initialized Drupal 11.0.9 root directory at /svr/drupal.app/web [0.52 sec, 5.24 MB]
[warning] Only lowercase sites-subdir are valid. Switching to mysite. [0.53 sec, 5.5 MB]
[info] Drush bootstrap phase: bootstrapDrupalSite() [0.54 sec, 5.79 MB]
[debug] Could not find a Drush config file at sites/mysite/drush.yml. [0.54 sec, 5.85 MB]
[info] Initialized Drupal site mysite at sites/mysite [0.54 sec, 5.85 MB]
[info] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.54 sec, 5.85 MB]
[info] sql:query: SELECT VERSION();" [0.57 sec, 6.47 MB]
[info] Executing: mysql --defaults-file=/tmp/drush_u58n5rfmhn5m8G0UBoR --database=db_drupal --host=localhost --silent -A < /tmp/drush_5ruauobd9frs36cVaVm [0.58 sec, 6.67 MB]
[info] sql:query: SELECT VERSION();" [0.59 sec, 6.73 MB]
[info] Executing: mysql --defaults-file=/tmp/drush_js4nr07j9iibeAGADCO --database=db_drupal --host=localhost --silent -A < /tmp/drush_cbmqk6tvb74c84Yp82w [0.59 sec, 6.73 MB]
[info] Executing: command -v mysql [0.59 sec, 6.74 MB]
[info] sql:query: SELECT 1; [0.6 sec, 6.74 MB]
[info] Executing: mysql --defaults-file=/tmp/drush_7dcvgie0vfj4eSUCA4G --database=db_drupal --host=localhost --silent -A < /tmp/drush_kto9d1kkqi3c4y3vIDl [0.6 sec, 6.74 MB]
You are about to:
* CREATE the 'db_drupal' database.
// Do you want to continue?: yes.
[info] Sites directory sites/mysite already exists - proceeding. [0.61 sec, 6.87 MB]
[info] sql:query: SELECT 1; [0.61 sec, 6.87 MB]
[info] Executing: mysql --defaults-file=/tmp/drush_6njgp7uv8vqh0K3UCb5 --database=db_drupal --host=localhost --silent -A < /tmp/drush_rfcpkvqa6dhi6yAetpr [0.61 sec, 6.87 MB]
[info] sql:query: DROP DATABASE IF EXISTS `db_drupal`; CREATE DATABASE `db_drupal` /*!40100 DEFAULT CHARACTER SET utf8 */; DROP USER IF EXISTS 'db_drupal_user'@'localhost'; CREATE USER 'db_drupal_user'@'localhost' IDENTIFIED WITH mysql_native_password; ALTER USER 'db_drupal_user'@'localhost' IDENTIFIED BY '"xxxxxxxxxxxx"'; GRANT ALL PRIVILEGES ON `db_drupal`.* TO 'db_drupal_user'@'localhost'; FLUSH PRIVILEGES; [0.62 sec, 6.87 MB]
[info] Executing: mysql --defaults-file=/tmp/drush_cokp5sha10lcaOZuHPt --database=information_schema --host=localhost --silent -A < /tmp/drush_0md0cpc46k8k73xwepc [0.62 sec, 6.87 MB]
[warning] Failed to drop or create the database. Do it yourself before installing. mysql: Deprecated program name. It will be removed in a future release, use '/usr/local/mariadb-lts/bin/mariadb' instead
ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2)
[0.62 sec, 6.87 MB]
[info] sql:query: SELECT VERSION();" [0.63 sec, 6.93 MB]
[info] Executing: mysql --defaults-file=/tmp/drush_pp8u8heolctlfxcwvGT --database=db_drupal --host=localhost --silent -A < /tmp/drush_3b5udmq68gp1e2kzOo3 [0.63 sec, 6.93 MB]
[notice] Starting Drupal installation. This takes a while. [0.63 sec, 6.94 MB]
[debug] Calling install_drupal(Composer\Autoload\ClassLoader, array, array) [0.64 sec, 7 MB]
[notice] Performed install task: install_select_language [0.96 sec, 16.13 MB]
[notice] Performed install task: install_select_profile [0.96 sec, 16.13 MB]
[notice] Performed install task: install_load_profile [0.96 sec, 16.13 MB]
[notice] Performed install task: install_verify_requirements [0.97 sec, 16.23 MB]
In SiteInstallCommands.php line 177:
[Drupal\Core\Installer\Exception\InstallerException]
Resolve all issues below to continue the installation. For help configuring
your database server, see the installation handbook [1], or contact your
hosting provider.
* Failed to connect to your database server. The server reports the
following message: /SQLSTATE[HY000] [2002] No such file or directory [Tip:
Drupal was attempting to connect to the database server via a socket, but
the socket file could not be found. A Unix socket file is used if you do
not specify a host name or if you specify the special host name localhost.
To connect via TCP/IP use an IP address (127.0.0.1 for IPv4) instead of
"localhost". This message normally means that there is no MySQL server
running on the system or that you are using an incorrect Unix socket file
name when trying to connect to the server.] /.
* Is the database server running?
* Does the database exist or does the database user have sufficient
privileges to create the database?
* Have you entered the correct database name?
* Have you entered the correct username and password?
* Have you entered the correct database hostname and port number?
...
the issue appears to be wrong socket
ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2)
i can connect to a MariaDB instance from shell
where
with
site install
fails with
the issue appears to be wrong socket
despite passing
to
drush si
i've no idea where that
/tmp/mysql.sock
originates.here
our production MariadDB instance is explicity built with
so, by default
and accepts only unix socket connections; TCP connection is disallowed by policy and build config.
what's the db-url string format to correctly pass the /run/mariadb/mariadb.sock to
drush si
?