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] [--mysql_db_prefix MYSQL_DB_PREFIX] [--] <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 name prefix. Defaults to `sites_`
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
--mysql_db_prefix=<value>
[DEPRECATED] MySQL database prefix

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] [--mysql_db_prefix MYSQL_DB_PREFIX] [--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 name prefix. Defaults to `sites_`
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
--mysql_db_prefix=<value>
[DEPRECATED] MySQL database prefix
--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.