gpt4 book ai didi

php - Laravel 5.6 MySQL 服务器已经消失

转载 作者:IT王子 更新时间:2023-10-29 00:36:02 28 4
gpt4 key购买 nike

背景

我有一个运行良好的基本 Laravel 应用程序。我在上面运行了一个 php artisan make:auth,迁移,注册了一个新用户,并且能够登录并查看 home.blade.php。我正在使用 valet 为网站提供服务,并将其停放在目录中。

我没有使用 Homestead,只是使用我的本地机器。

导致问题的原因

我运行了 brew update/brew upgrade,现在完全无法登录应用程序。

预期结果

登录应用,查看home.blade.php

抛出错误

PDOException (2006)
SQLSTATE[HY000] [2006] MySQL server has gone away
在浏览器中显示。

PDOException(code: 0): PDO::__construct(): Unexpected server respose while doing caching_sha2 auth: 109 出现在 Laravel 日志中。

怀疑它与 MySQL 的用户权限有关,虽然我只是在这里停滞不前,所以我想我会把它扔给 Obi-Wan 的计算机世界。

什么有效

我仍然可以在浏览器中查看 welcome.blade.php,并且 ping 服务器返回一个响应,这样就可以了。

我可以通过终端以 root 身份登录 MySQL 没问题。

mysql -u root -p

mysql> SELECT user, host FROM mysql.user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| jason | % |
| jason | localhost |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+------------------+-----------+
6 rows in set (0.00 sec)

我的数据库存在

mysql> show tables;
+-----------------------+
| Tables_in_digitalchef |
+-----------------------+
| migrations |
| model_has_permissions |
| model_has_roles |
| orders |
| password_resets |
| permissions |
| role_has_permissions |
| roles |
| users |
+-----------------------+
9 rows in set (0.00 sec)

mysql>

我的设置

PHP 版本

jason@Jasons-MacBook-Air:~/Desktop/websites$ php -v
PHP 7.2.8 (cli) (built: Jul 19 2018 12:15:24) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.8, Copyright (c) 1999-2018, by Zend Technologies

Nginx 版本

jason@Jasons-MacBook-Air:~/Desktop/websites$ nginx -v
nginx version: nginx/1.15.3

MySQL版本

jason@Jasons-MacBook-Air:~$ mysql --version
mysql Ver 8.0.12 for osx10.13 on x86_64 (Homebrew)

代客版

Laravel Valet 2.0.9

$路径

jason@Jasons-MacBook-Air:~$ echo $PATH
/usr/local/opt/mysql@8.0/bin:/usr/local/sbin:/Users/jason/.composer/vendor/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin/python3:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

编辑 - 更新了这个,仍然没有运气我的/etc/my.cnf的内容:

[mysqld]
max_allowed_packet = 500M
wait_timeout = 58800
ssl-ca=/etc/mysql-ssl/ca-cert.pem
ssl-cert=/etc/mysql-ssl/server-cert.pem
ssl-key=/etc/mysql-ssl/server-key.pem

我的.env

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:/rKbcwAqCwbNt9XNBZq1jzvRzi7K4Jdch3k5/OtUgis=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=digitalchef
DB_USERNAME=root
DB_PASSWORD=root

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

我的database.php

<?php

return [

/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/

'default' => env('DB_CONNECTION', 'mysql'),

/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/

'connections' => [

'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],

'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],

'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
'sslmode' => 'prefer',
],

'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
],

],

/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/

'migrations' => 'migrations',

/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/

'redis' => [

'client' => 'predis',

'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],

],

];

日志中的最新条目

[2018-09-10 18:15:26] local.ERROR: SQLSTATE[HY000] [2006] MySQL server has gone away {"exception":"[object] (PDOException(code: 2006): SQLSTATE[HY000] [2006] MySQL server has gone away at /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68, PDOException(code: 0): PDO::__construct(): Unexpected server respose while doing caching_sha2 auth: 109 at /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68)
[stacktrace]
#0 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(68): PDO->__construct('mysql:host=127....', 'root', 'root', Array)
#1 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(98): Illuminate\\Database\\Connectors\\Connector->createPdoConnection('mysql:host=127....', 'root', 'root', Array)
#2 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(48): Illuminate\\Database\\Connectors\\Connector->tryAgainIfCausedByLostConnection(Object(PDOException), 'mysql:host=127....', 'root', 'root', Array)
#3 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection('mysql:host=127....', Array, Array)
#4 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(182): Illuminate\\Database\\Connectors\\MySqlConnector->connect(Array)
#5 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()
#6 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connection.php(915): call_user_func(Object(Closure))
#7 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(248): Illuminate\\Database\\Connection->getPdo()
#8 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(234): Illuminate\\Database\\DatabaseManager->refreshPdoConnections('mysql')
#9 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(168): Illuminate\\Database\\DatabaseManager->reconnect('mysql')
#10 [internal function]: Illuminate\\Database\\DatabaseManager->Illuminate\\Database\\{closure}(Object(Illuminate\\Database\\MySqlConnection))
#11 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): call_user_func(Object(Closure), Object(Illuminate\\Database\\MySqlConnection))
#12 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connection.php(735): Illuminate\\Database\\Connection->reconnect()
#13 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connection.php(717): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection(Object(Illuminate\\Database\\QueryException), 'select * from `...', Array, Object(Closure))
#14 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connection.php(627): Illuminate\\Database\\Connection->handleQueryException(Object(Illuminate\\Database\\QueryException), 'select * from `...', Array, Object(Closure))
#15 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Connection.php(333): Illuminate\\Database\\Connection->run('select * from `...', Array, Object(Closure))
#16 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1963): Illuminate\\Database\\Connection->select('select * from `...', Array, true)
#17 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1951): Illuminate\\Database\\Query\\Builder->runSelect()
#18 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2435): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#19 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1952): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure))
#20 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(481): Illuminate\\Database\\Query\\Builder->get(Array)
#21 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(465): Illuminate\\Database\\Eloquent\\Builder->getModels(Array)
#22 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(77): Illuminate\\Database\\Eloquent\\Builder->get(Array)
#23 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php(128): Illuminate\\Database\\Eloquent\\Builder->first()
#24 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php(352): Illuminate\\Auth\\EloquentUserProvider->retrieveByCredentials(Array)
#25 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php(79): Illuminate\\Auth\\SessionGuard->attempt(Array, false)
#26 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php(44): App\\Http\\Controllers\\Auth\\LoginController->attemptLogin(Object(Illuminate\\Http\\Request))
#27 [internal function]: App\\Http\\Controllers\\Auth\\LoginController->login(Object(Illuminate\\Http\\Request))
#28 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#29 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('login', Array)
#30 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\Auth\\LoginController), 'login')
#31 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\\Routing\\Route->runController()
#32 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Router.php(665): Illuminate\\Routing\\Route->run()
#33 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#34 /Users/jason/Desktop/websites/restaurant/digitalchef/app/Http/Middleware/RedirectIfAuthenticated.php(24): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#35 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): App\\Http\\Middleware\\RedirectIfAuthenticated->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#36 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#37 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#38 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#39 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#40 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(68): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#41 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#42 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#43 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#44 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#45 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#46 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#47 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#48 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#49 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#50 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#51 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#52 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#53 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#54 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#55 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#56 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Router.php(667): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#57 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Router.php(642): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#58 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Router.php(608): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#59 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Router.php(597): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#60 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#61 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#62 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#63 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#64 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#65 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#66 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#67 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#68 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#69 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#70 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#71 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#72 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#73 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#74 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#75 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#76 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#77 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#78 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#79 /Users/jason/Desktop/websites/restaurant/digitalchef/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#80 /Users/jason/Desktop/websites/restaurant/digitalchef/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#81 /Users/jason/.composer/vendor/laravel/valet/server.php(147): require('/Users/jason/De...')
#82 {main}
"}

我一直在尝试的:

我宁愿不必回滚到 7.2.7,但如果这是唯一的选择,那么我想我进退两难,别无选择。

任何帮助都会很棒。如果你需要更多关于任何事情的信息,尽管问,我会回答。非常感谢您!

最佳答案

这对我有用。我使用以下命令使用新的身份验证插件更新我的密码。您现在可以使用 MySQL 8。玩得开心。

ALTER USER `username`@`localhost` IDENTIFIED WITH caching_sha2_password BY 'password';

如果上面的方法不起作用,请改用它。

ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

关于php - Laravel 5.6 MySQL 服务器已经消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52263697/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com