Problem with Laravel new user (SQL query error)

I export my local database in MySql and then I imported it to the Infinity Free MySql but when creating a new user in my laravel project it gives me a SQL query error it tells me this

Username ( dev85LRR )

URL http://tusrecetas.infinityfreeapp.com/register

Error Message

SQLSTATE[HY000]: General error: 1364 Field ‘id’ doesn’t have a default value (SQL: insert into users (name, email, password, url, updated_at, created_at) values (XY, [email protected], $xyxyxyxyxyxyxyxyxyxyBZ., 2021-05-07 23:26:33, 2021-05-07 23:26:33))

Other Information

I did the project in Laravel 7

It seems that you have to configure the id field of the table users to auto increment.

Open PhpMyAdmin in the Vpanel, choose your database, than choose the table users, than choose the tab “Structure” and, in the id field, check if it is auto incrementing.

3 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.