# Bizarre import issue -- Mysql query returning PG::Result?

**URL:** <https://meta.discourse.org/t/bizarre-import-issue-mysql-query-returning-pg-result/126852>\
**Category:** Development\
**Created:** [26 באוגוסט,‏ 2019,‏ 5:51pm UTC](https://meta.discourse.org/t/bizarre-import-issue-mysql-query-returning-pg-result/126852 "2019-08-26T17:51:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [28 באוגוסט,‏ 2019,‏ 9:17pm UTC](https://meta.discourse.org/t/bizarre-import-issue-mysql-query-returning-pg-result/126852/2 "2019-08-28T21:17:24Z")

</div>

> [@pfaffman](#):
>
> `ActiveRecord::Base.connection.reconnect!`

Why?! That call reconnects to Postgres and returns the `PG::Result` object you are seeing. Your hack is just hiding the fact that you are doing something ~~stupid~~ you shouldn’t do. 😉

I guess what you are really looking for is the `reconnect` [connection option](https://github.com/brianmario/mysql2#connection-options) of the mysql2 client.

---

_[View the full topic](https://meta.discourse.org/t/bizarre-import-issue-mysql-query-returning-pg-result/126852)._
