gpt4 book ai didi

mysql - Ubuntu 18.04 错误 mysql_proc xampp laravel 迁移

转载 作者:行者123 更新时间:2023-11-29 15:43:36 26 4
gpt4 key购买 nike

我在使用 Laravel 时遇到了问题。

本地服务器: xampp 7.3.7S.O: ubuntu 18.04,框架: laravel,错误:带有存储过程的数据库 SQL 未运行。

当我尝试使用php artisan migrate时,它向我显示此错误:

Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1558 Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100316. Please use mysql_upgrade to fix this error (SQL: DROP PROCEDURE IF EXISTS procedure_sum_pay)

at /opt/lampp/htdocs/project-app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664

Exception trace:

1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000]: General error: 1558 Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100316. Please use mysql_upgrade to fix this error") /opt/lampp/htdocs/project-app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43

2 PDOException::("SQLSTATE[HY000]: General error: 1558 Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100316. Please use mysql_upgrade to fix this error") /opt/lampp/htdocs/project-app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:41

最佳答案

也许这个答案来得有点晚了,但是要从 MySQL 解决这个问题,你只需要运行mysql_upgrade -u root -p

现在,如果您在 Ubuntu 中使用 XAMPP,mysql_upgrade 文件位于 /opt/lampp/bin/mysql 下,因此您可以在安装后运行上述命令都在该目录中。通常,默认情况下,使用 XAMPP 时,用户“root”可能没有设置密码。

关于mysql - Ubuntu 18.04 错误 mysql_proc xampp laravel 迁移,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57317290/

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