[使用魔术函数在python中连接mysql时如何处理@ at密码

问题描述 投票:0回答:1

我想使用%sql魔术函数在python中连接到mysql:

语法如下:

%sql mysql://root:password@[email protected]/database1

因为密码中有@,>>

我尝试将@替换为%40,但仍然无法正常工作。

错误消息如下:enter image description here

我想使用%sql魔术函数在python中连接到mysql:语法如下:%sql mysql:// root:password @ 1234 @ 127.0.0.1 / database1由于密码中有@,我尝试了替换@ ...

mysql mysql-python
1个回答
0
投票

不使用quote_plus帮助您吗?

© www.soinside.com 2019 - 2024. All rights reserved.