r2252342 大佬有话说 : 2020-1-21 11:20:34
安装laravel-admin总是提示这个,是什么原因呢。
安装laravel-admin总是提示这个,是什么原因呢。
执行的php artisan admin:install这条命令
错误:
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
IlluminateDatabaseQueryException: SQLSTATE: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))
at D:phpstudy_proWWWlaravel-adminvendorlaravelframeworksrcIlluminateDatabaseConnection.php:669
665| // If an exception occurs when attempting to run a query, we’ll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database’s errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
Exception trace:
1 DoctrineDBALDriverPDOException::("SQLSTATE: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")
D:phpstudy_proWWWlaravel-adminvendordoctrinedballibDoctrineDBALDriverPDOStatement.php:123
2 PDOException::("SQLSTATE: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")
D:phpstudy_proWWWlaravel-adminvendordoctrinedballibDoctrineDBALDriverPDOStatement.php:121
Please use the argument -v to see more details.
xljbear 大佬有话说 : 2020-1-21 11:31:16
mysql 版本低于5.7 MyISAM表的主键最大是1000字节,升级mysql
king51 大佬有话说 : 2020-1-21 11:31:41
yc014t 安装页面上面不是写着解决办法吗
https://github.com/z-song/laravel-admin/issues/1541
r2252342 大佬有话说 : 2020-1-21 12:12:01
king51 大佬有话说 : 2020-1-21 11:31
安装页面上面不是写着解决办法吗
https://github.com/z-song/laravel-admin/issues/1541 …
已解决。非常感谢!