What could be causing the issue where only the first user can successfully insert data into the table?

The issue could be related to a lack of proper permissions for the other users to insert data into the table. To solve this, you need to ensure that all users have the necessary permissions granted in the database. This can be done by checking the user privileges in the database management system and granting INSERT permissions to the relevant users.

// Grant INSERT permissions to all users in the database
GRANT INSERT ON database_name.table_name TO 'user'@'host';