I follow this guide.


I tried to run web installation but it always got stucked so now i try this.

when i go to mysql as root

mysql> show databases;
| Database           |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
4 rows in set (0,00 sec)

there are not any tables for magento.

So i run this command given in the link

magento setup:install --base-url= \
--db-host=localhost --db-name=magento --db-user=magento --db-password=magento \
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1

but mine cant run magento so i use ./magento

root@vegan:/var/www/html/magento2/bin# ./magento setup:install --base-url= --db-host=localhost --db-name=magento --db-user=magento --db-password=magento --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
SQLSTATE[HY000] [1045] Access denied for user 'magento'@'localhost' (using password: YES)

  Parameter validation failed  

and other green writings

setup:install [--backend-frontname="..."] [--key="..."] [--session-save="..."] [--definition-format="..."] [--db-host="..."]

[--db-name="..."] [--db-user="..."] [--db-engine="..."] [--db-password="..."] [--db-prefix="..."] [--db-model="..."] [--db-init-statements="..."] [-s|--skip-db-validation] [--http-cache-hosts="..."] [--base-url="..."] [--language="..."] [--timezone="..."] [--currency="..."] [--use-rewrites="..."] [--use-secure="..."] [--base-url-secure="..."] [--use-secure-admin="..."] [--admin-use-security-key="..."] [--admin-user="..."] [--admin-password="..."] [--admin-email="..."] [--admin-firstname="..."] [--admin-lastname="..."] [--cleanup-database] [--sales-order-increment-prefix="..."] [--use-sample-data] [--magento-init-params="..."]

it says in informaton


User name of the Magento database instance owner.

Default is root.

so i use my mysql password and admin name for it. this time it works but another errors

root@vegan:/var/www/html/magento2/bin# ./magento setup:install --base-url= --db-host=localhost --db-name=magentodb --db-user=root --db-password= root --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --cleanup-database help

  Too many arguments.  

SO, i decrease parameters. but again same

root@vegan:/var/www/html/magento2/bin# ./magento setup:install --base-url= --db-host=localhost --db-name=magentodb --db-user=root --db-password= root 

  Too many arguments. 

i can see


page here. i think there are no errors. i can run also setup but it stuck at %66 %67. yesterday i completed this but it was not adding to shopping card, today i deleted all php 5.6 7.0 in my pc and reinstall all. But now, it cant install..

what can be reason? i downloaded magento from web and extracted to ww/html

directory is


even for this errors

root@vegan:/var/www/html/magento2/bin# ./magento setup:install admin-user="root"

  Too many arguments.

By the way, i forgot to put.

i create user and db before

mysql> CREATE DATABASE prestashopdb;
7- mysql> CREATE USER magento@localhost IDENTIFIED BY 'magento';
8- mysql> GRANT ALL PRIVILEGES on magentodb.* to magento@localhost;
10- mysql> exit
11- sudo service apache2 restart
12- sudo service mysql restart
  • i have got a different problem installing Magento 2.2 using command line. this is the error message: [Symfony\Component\Console\Exception\RuntimeException] The "-?" option does not exist. this is the command line: > php bin/magento setup:install --base-url=dev.myshop.com --db-host=localhost --db-name=my_shop --db-user=1234567 --db-password=pwd123456 --admin-firstname=Magento --admin-lastname=User --admin-email=my@email.com --currency=USD --timezone=America/Chicago --use-rewrites=1 --admin-user=superadmin --admin-password=12345678asdf as you see, I don't use the -? anywhere in there. an – Gery Nov 9 '18 at 18:01
  • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review – Vivek Kumar Nov 9 '18 at 20:24
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review – Jai Nov 10 '18 at 1:57

You have to create database 1st from command line or PHPMyAdmin. After creating database, run below command to install using command line.

php bin/magento setup:install --base-url= \ --db-host=localhost --db-name=rock --db-user=root --db-password= \ --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ --admin-user=admin --admin-password=admin123 --language=en_US \ --currency=USD --timezone=America/Chicago --use-rewrites=1

Above command will install magento2 quickly than web interface.

  • Hello sir. i tried with web and it succeeded but now anther errors – fff Sep 8 '16 at 7:10
  • What other errors you are seeing? – Ravi Bhalodia Sep 8 '16 at 7:12
  • 404 for localho magento. fr localhost it workds – fff Sep 8 '16 at 7:22
  • enable mod_rewrite module. – Ravi Bhalodia Sep 8 '16 at 7:28
  • ,i already enabled caner@vegan:~$ sudo a2enmod rewrite Module rewrite already enabled – fff Sep 8 '16 at 7:33

Try that it works.

php bin/magento setup:install --base-url="http://www.example.com/staging/"  --db-host="localhost" --db-name="magento_staging" --db-user="magento_staging" --db-password="PASSWORD" --admin-firstname="Magento" --admin-lastname="User" --admin-email="example@example.com" --admin-user="MagentoAdmin" --admin-password="Magento@#123K" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1"

You need to create the database and a user for the database first. Then include these in the install command.

It might be easier to use the web installation, at what point do you get stuck?

  • At &66 %67 . i will tell you now. again %67 Module 'Magento_Rss': Module 'Magento_CatalogRuleConfigurable': Module 'Magento_Authorizenet': Module 'Magento_OfflineShippingSampleData': Installing data... Module 'Magento_BundleSampleData': Installing data... Module 'Magento_ConfigurableSampleData': Installing data... – fff Sep 7 '16 at 16:13
  • again Module 'Magento_OfflineShippingSampleData': Installing data... Module 'Magento_BundleSampleData': Installing data... Module 'Magento_ConfigurableSampleData': Installing data... – fff Sep 7 '16 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.