Skip to content

MySqlException: Parameter '@.....' must be defined. To use this as a variable, set 'Allow User Variables=true' in the connection string. #1172

@PaulatElf

Description

@PaulatElf

Software versions
MySqlConnector version: 0.69.10
Server type (MySQL) and version: 8.0
.NET version: 6.02

Describe the bug
I have this issue too but only on my live website, when running from Visual Studio (localhost) don't have any problems but when using Hangfire (1.8.0) Dashboard on the live published site I can access a few pages (/hangfire, /hangfire/servers, /hangfire/jobs) but for all the other pages (such as hangfire/recurring, hangfire/retries, hangfire/jobs/succeeded ect.) I always get that same message: 'MySqlException: Parameter '@.....' must be defined. To use this as a variable, set 'Allow User Variables=true' in the connection string.'

Even though I already do have 'Allow User Variables=true' in the connection string.

If anyone has any ideas how to fix this it would be very helpful.

Exception
MySqlException: Parameter '@rank' must be defined. To use this as a variable, set 'Allow User Variables=true' in the connection string.

MySqlException: Parameter '@rownum' must be defined. To use this as a variable, set 'Allow User Variables=true' in the connection string.

MySqlConnector.Core.StatementPreparer.GetParameterIndex(string name) in StatementPreparer.cs, line 48

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for answerNeeds more information from the bug reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions