您的位置: 首页 > 文章 > python中的pymysql模块 python中的pymysql模块 分类: 文章 • 2024-06-24 07:48:16 文章目录 环境的配置 pycharm如何操作数据库 对数据库的查询 cursor.scroll的用法 mariadb中如何修改数据库的编码格式 环境的配置 1.需要在自己的linux 中安装mariadb-server 程序(端口为3306),并且开启。注意,不能进行网络的安全设定(vim /etc/my.cf vim skip-networking=1),因为通过网络来在pycharm中进行操作。 2.在pycharm中导入pymysql模块。或者 在联网的情况下,执行下列命令。 pycharm如何操作数据库 1.先连接数据库,再操作。3.插入数据提交的第二种方式: 4.插入多条数据 对数据库的查询 2. 3. 4. 5. 6. cursor.scroll的用法 mariadb中如何修改数据库的编码格式