cancel
Showing results for 
Search instead for 
Did you mean: 

Installation incomplete [ERROR] exception 'PDOException' with message 'SQLSTATE[HY000]: General erro

Installation incomplete [ERROR] exception 'PDOException' with message 'SQLSTATE[HY000]: General erro

Hello Friends!

 

I was installing magento CE 2.1.1. with sample data,  using setup wizard. When it was 0% I got the error message as the following:

 

......

[ERROR] exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1010 Error dropping database (can't rmdir './magento', errno: 39)' in /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/posnowz/www/magento2b/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#3 /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DROP DATABASE I...', Array)
#5 /home/posnowz/www/magento2b/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(452): Zend_Db_Adapter_Pdo_Abstract->query('DROP DATABASE I...', Array)
#6 /home/posnowz/www/magento2b/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(507): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('DROP DATABASE I...', Array)
#7 /home/posnowz/www/magento2b/setup/src/Magento/Setup/Model/Installer.php(1140): Magento\Framework\DB\Adapter\Pdo\Mysql->query('DROP DATABASE I...')
#8 [internal function]: Magento\Setup\Model\Installer->cleanupDb()
#9 /home/posnowz/www/magento2b/setup/src/Magento/Setup/Model/Installer.php(344): call_user_func_array(Array, Array)
#10 /home/posnowz/www/magento2b/setup/src/Magento/Setup/Controller/Install.php(109): Magento\Setup\Model\Installer->install(Array)
#11 /home/posnowz/www/magento2b/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction()
#12 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 /home/posnowz/www/magento2b/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#14 /home/posnowz/www/magento2b/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /home/posnowz/www/magento2b/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 /home/posnowz/www/magento2b/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#17 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#18 /home/posnowz/www/magento2b/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#19 /home/posnowz/www/magento2b/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#20 /home/posnowz/www/magento2b/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#21 /home/posnowz/www/magento2b/setup/index.php(31): Zend\Mvc\Application->run()
#22 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 1010 Error dropping database (can't rmdir './magento', errno: 39), query was: DROP DATABASE IF EXISTS `magento`' in /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /home/posnowz/www/magento2b/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#2 /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/posnowz/www/magento2b/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DROP DATABASE I...', Array)
#4 /home/posnowz/www/magento2b/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(452): Zend_Db_Adapter_Pdo_Abstract->query('DROP DATABASE I...', Array)
#5 /home/posnowz/www/magento2b/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(507): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('DROP DATABASE I...', Array)
#6 /home/posnowz/www/magento2b/setup/src/Magento/Setup/Model/Installer.php(1140): Magento\Framework\DB\Adapter\Pdo\Mysql->query('DROP DATABASE I...')
#7 [internal function]: Magento\Setup\Model\Installer->cleanupDb()
#8 /home/posnowz/www/magento2b/setup/src/Magento/Setup/Model/Installer.php(344): call_user_func_array(Array, Array)
#9 /home/posnowz/www/magento2b/setup/src/Magento/Setup/Controller/Install.php(109): Magento\Setup\Model\Installer->install(Array)
#10 /home/posnowz/www/magento2b/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction()
#11 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#12 /home/posnowz/www/magento2b/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13 /home/posnowz/www/magento2b/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /home/posnowz/www/magento2b/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /home/posnowz/www/magento2b/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#16 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#17 /home/posnowz/www/magento2b/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#18 /home/posnowz/www/magento2b/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#19 /home/posnowz/www/magento2b/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#20 /home/posnowz/www/magento2b/setup/index.php(31): Zend\Mvc\Application->run()
#21 {main}

 

This was running at VPS hosting with PHP 5.6.23, Apache 2.2.15, MySQL 5.6.31 & installation base url is

 

 "/home/posnowz/www/magento2b/"

 

Could you please help me out with this?

 

Thank you so much!

2 REPLIES

Re: Installation incomplete [ERROR] exception 'PDOException' with message 'SQLSTATE[HY000]: General

Hello Zhangzlili,

 

I am also having a similar problem, except that my error code is 1018.  

 

The rest of the messages are pretty much the same.

 

Have you been able to resolve this issue?

 

Thanks in advance.  

Re: Installation incomplete [ERROR] exception 'PDOException' with message 'SQLSTATE[HY000]: General

I been having the same issue with magento 2.2.1 and 2.2.2  clean install

I believe the issue is Mysql server settings and performance setting. i can not wrap my head around it .

looking at the console log , i can see magento tries to upgrade schema if it fails , tries to do it again for the second time , but encounters table with the field that wants to insert thus giving the error . 

so , if any MBA out here ,would be good idea to let us now how to setup mysql server to Handel magento .

Thanks