S
S
Space2015-05-25 09:31:22
MySQL
Space, 2015-05-25 09:31:22

How to change MySQL version?

Tables are created. Gives an error in the console (below). I searched for an answer and found this: "the script is used to run older versions of MySQL (where the default is myisam) and yours is newer (where the default is innodb". Question: how can I fix this?
Error log

> create unique index account_unique on {{%account}} (provider,client_id) ...Exception 'yii\db                \Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key wa                s too long; max key length is 1000 bytes
The SQL being executed was: CREATE UNIQUE INDEX `account_unique` ON `account` (`provider`, `client                _id`)'

in /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/db/Schema.php:595

Error Info:
Array
(
    [0] => 42000
    [1] => 1071
    [2] => Specified key was too long; max key length is 1000 bytes
)

Stack trace:
#0 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/db/Command.php(779): yii\db\Schema->convertException(Object(PDOException), 'CREATE UNIQUE I...')
#1 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/db/Migration.php(420): yii\db\Command->execute()
#2 /var/www/admin/www/mpro.com/vendor/dektrium/yii2-user/migrations/m140403_174025_create_account_table.php(30): yii\db\Migration->createIndex('account_unique', '{{%account}}', Array, true)
#3 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(492): m140403_174025_create_account_table->up()
#4 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(129): yii\console\controllers\BaseMigrateController->migrateUp('m140403_174025_...')
#5 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#6 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#7 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#8 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller->runAction('up', Array)
#9 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller->runAction('up', Array)
#10 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/console/Application.php(161): yii\base\Module->runAction('migrate/up', Array)
#11 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/console/Application.php(137): yii\console\Application->runAction('migrate/up', Array)
#12 /var/www/admin/www/mpro.com/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#13 /var/www/admin/www/mpro.com/yii(23): yii\base\Application->run()
#14 {main}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-05-25
@ruslite

https://confluence.atlassian.com/display/FISHKB/My...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question