Database

database:drop

Drop the site's database

Syntax

joomla database:drop [--www WWW] [-L|--mysql-login MYSQL-LOGIN] [-H|--mysql-host MYSQL-HOST] [-P|--mysql-port MYSQL-PORT] [--mysql_db_prefix MYSQL_DB_PREFIX] [-db|--mysql-database MYSQL-DATABASE] [--mysql-driver MYSQL-DRIVER] [--] <site>

Arguments

site

Alphanumeric site name. Also used in the site URL with .test domain

Options

--www=<value>

Web server root

Default: /var/www
--mysql-login=<value> , -L=<value>

MySQL credentials in the form of user:password

Default: root:root
--mysql-host=<value> , -H=<value>

MySQL host

Default: localhost
--mysql-port=<value> , -P=<value>

MySQL port

Default: 3306
--mysql_db_prefix=<value>

MySQL database prefix

Default: sites_
--mysql-database=<value> , -db=<value>

MySQL database name. If set, the --mysql_db_prefix option will be ignored.

--mysql-driver=<value>

MySQL driver

Default: mysqli

database:install

Install the Joomla database

Syntax

joomla database:install [--www WWW] [-L|--mysql-login MYSQL-LOGIN] [-H|--mysql-host MYSQL-HOST] [-P|--mysql-port MYSQL-PORT] [--mysql_db_prefix MYSQL_DB_PREFIX] [-db|--mysql-database MYSQL-DATABASE] [--mysql-driver MYSQL-DRIVER] [--sample-data SAMPLE-DATA] [--sql-dumps SQL-DUMPS] [-d|--drop] [-e|--skip-exists-check] [--] <site>

Arguments

site

Alphanumeric site name. Also used in the site URL with .test domain

Options

--www=<value>

Web server root

Default: /var/www
--mysql-login=<value> , -L=<value>

MySQL credentials in the form of user:password

Default: root:root
--mysql-host=<value> , -H=<value>

MySQL host

Default: localhost
--mysql-port=<value> , -P=<value>

MySQL port

Default: 3306
--mysql_db_prefix=<value>

MySQL database prefix

Default: sites_
--mysql-database=<value> , -db=<value>

MySQL database name. If set, the --mysql_db_prefix option will be ignored.

--mysql-driver=<value>

MySQL driver

Default: mysqli
--sample-data=<value>

Sample data to install (default|blog|brochure|learn|testing). Ignored if custom dump files are given using --sql-dumps.

--sql-dumps=<value>

Full path to SQL dump file to import. If not set, the command will use the default Joomla installation files.

--drop , -d

Drop database if it already exists

--skip-exists-check , -e

Do not check if database already exists or not.

Need Help?

Let our developers personally assist you. You can ask development related questions in our Support Center. Only for Business or Agency subscribers.

Join 23000+ others and subscribe to our newsletter!