laravel - Digitalocen 站点部署中的迁移错误
问题描述
当我运行 php artisan migrate 时,出现这样的错误
Illuminate\Database\QueryException : SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
at /root/sewa/vendor/laravel/framework/src/Illuminate/Database/Connection.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 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'")
/root/sewa/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31
2 PDOException::("SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'")
/root/sewa/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27
Please use the argument -v to see more details.
你能帮我解决这个问题吗
解决方案
推荐阅读
- php - 如何使用带有自定义字段标题的 wp_list_pages() 函数从自定义帖子类型中列出帖子?
- c - 基本 shell 实现 - 打开:权限被拒绝
- .net - 无法在 Visual Studio 2019 中打开 WPF 解决方案
- xml - PowerShell - 不区分大小写的 XML 属性名称的 xpath
- python - 我的帐户创建程序在第一次验证后不验证输入,有没有更有效的方法?
- javascript - 我的模式没有显示我的内容但是控制台日志能够检索它
- python - 如何运行 Tornado 的 IOLoop 的多个实例?
- python - 裂缝检测开放式简历
- html - 具有固定宽度的 HTML tableheadercell 没有相应地表现
- linux - 无法 git clone 和更改目录的权限