ValueError: invalid literal for int() with base 10: '127.0.0.1:3306'

149 views
Skip to first unread message

bloomlync monisha

unread,
Nov 14, 2022, 9:43:36 AM11/14/22
to Django users
 Hello Everyone,
                    I was facing an error while I am trying to connect the database through mysql, when I run the database I got this below mentioned error, here i attached the cmd screenshot and coding screenshot for you references.

Kindly help me to sort out this error.

Error: 

    kwargs["port"] = int(settings_dict["PORT"])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '127.0.0.1:3306'Screenshot (52).pngScreenshot (53).png

Kasper Laudrup

unread,
Nov 14, 2022, 12:28:37 PM11/14/22
to django...@googlegroups.com
On 14/11/2022 13.09, bloomlync monisha wrote:
>  Hello Everyone,
>                     I was facing an error while I am trying to connect
> the database through mysql, when I run the database I got this below
> mentioned error, here i attached the cmd screenshot and coding
> screenshot for you references.
>
> Kindly help me to sort out this error.
>
> Error:
>
>     kwargs["port"] = int(settings_dict["PORT"])
>                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
> ValueError: invalid literal for int() with base 10:
> '127.0.0.1:3306'

As the error message clearly states, the string '127.0.0.1:3306' cannot
be converted to an integer in base 10.

You most likely meant to write 3306 instead and specify the IP address
somewhere else, but of course, you're the only one who knows for sure.

Kind regards,
Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages