mysql服务器在安装迁移过程中消失了错误(laravel)

编程入门 行业动态 更新时间:2024-10-28 18:22:26
本文介绍了mysql服务器在安装迁移过程中消失了错误(laravel)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

因此,我在laravel文件夹中使用了cmd,然后尝试这样做(php artisan migration:install).出现2个错误.

So I am using my cmd on my laravel folder and I tried to do (php artisan migrate:install). 2 errors came up.

  • [PDOException] SQLSTATE [HY000] [2006] MySQL服务器已消失

    [PDOException] SQLSTATE[HY000] [2006] MySQL server has gone away

  • [ErrorException] PDO :: __ construct():MySQL服务器已消失

    [ErrorException] PDO::__construct(): MySQL server has gone away

  • 谁能解释我做错了吗?

    推荐答案

    这不是Laravel问题,而是一般的MySQL问题.也许服务器未运行.您确定在后台运行MySQL吗?

    This is not a Laravel issue, but a general MySQL Issue. Maybe the server is not running. Are you sure you're running MySQL in the background?

    检查此链接: MySQL走了

    在系统中进行以下检查:

    Do the following checks in your system:

  • 数据库引擎正在运行
  • 您已经创建了数据库
  • 您已创建用户并授予数据库权限
  • 您已经在Laravel的.env文件中设置了用户和数据库.
  • 此后,请尝试再次运行migrations命令,即:

    After this, try to run the migrations command again, which is:

    php artisan migrate

    此处

    让我们知道是否有帮助:).

    Let us know if that helps :).

    更多推荐

    mysql服务器在安装迁移过程中消失了错误(laravel)

    本文发布于:2023-10-12 20:40:23,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1485836.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:过程中   错误   服务器   消失了   mysql

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!