I am trying to setup magento 2 on ubuntu 14.04.

But when it reaches the database setup it gives me an error

Recoverable Error: Argument 1 passed to Magento\Framework\DB\Adapter\Pdo\Mysql::__construct() must be an instance of Magento\Framework\Stdlib\String, instance of Magento\Framework\Stdlib\StringUtils given, called in /var/www/magento2/lib/internal/Magento/Framework/Model/ResourceModel/Type/Db/Pdo/Mysql.php on line 74 and defined in /var/www/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php on line 194

I have searched everywhere but unable to find the answer.Please help me.

2 Answers 2


It's not the real solution, but did you already try to install it via command line? Maybe this will skip the error. You can modify this script, but this is the one from the Magento docs:

php bin/magento setup:install --base-url= \
--db-host=localhost --db-name=magento --db-user=magento --db-password=magento \
--admin-firstname=Magento --admin-lastname=User [email protected] \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1

See http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-install.html for more information.


I have already setup magento 2 in ubuntu 14.04 LTS version,

php bin/magento setup:install --base-url= --db-host=localhost --db-name=magento2 --db-user=root --db-password=root --admin-firstname=admin --admin-lastname=admin [email protected] --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago

You have to create database before install. in above i have create database magento2. you can keep your custom name for db.

  • Yes I already tried using CLI but it gives me more such errors. i.e, wrong arguments passed Jan 10, 2016 at 11:57
  • And also created a database before setup. Jan 10, 2016 at 11:58
  • Have you checked your db name root and password is root? in above command i have set db name and password is root. This is user and passwrod for mysql. If you have different username and password then you have to set as per your settings in above --db-user and --db-password field. Jan 11, 2016 at 5:05
  • Yes I did that I had replaced it with mysql credentials. Using which I login to mysql workbench. Jan 11, 2016 at 8:22
  • its working or not now? if working then accept this answer for help to community user. Jan 11, 2016 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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