Laravel 5.6迁移问题

时间:2018-05-02 22:58:05

标签: php laravel laravel-5

尝试在Laravel 5.6(使用MAMP 4 / Macbook Pro)中执行表的迁移时,我收到此错误。双重检查设置,它们工作正常(能够使用Sequel Pro访问我的数据库):

Illuminate \ Database \ QueryException:SQLSTATE [HY000] [2002]没有这样的文件或目录(SQL:select * from information_schema.tables where table_schema = laravel_database and table_name = migrations)

              at /Users/User1/Desktop/LaravelFolder/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
                660|         // If an exception occurs when attempting to run a query, we'll format the error
                661|         // message to include the bindings with SQL, which will make this exception a
                662|         // lot more helpful to the developer instead of just the database's errors.
                663|         catch (Exception $e) {
              > 664|             throw new QueryException(
                665|                 $query, $this->prepareBindings($bindings), $e
                666|             );
                667|         }
                668|

              Exception trace:

              1   PDOException::("SQLSTATE[HY000] [2002] No such file or directory")
                  /Users/User1/Desktop/LaravelFolder/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68

              2   PDO::__construct("mysql:host=localhost;port=8889;dbname=laravel_database", "root", "root", [])
                  /Users/User1/Desktop/LaravelFolder/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68

0 个答案:

没有答案
相关问题