PyCharm import MySQL
<p>I am trying </p>

<pre><code>import MySQLdb as mdb
</code></pre>

<p>on PyCharm and get the error:</p>

<pre><code>ImportError: No module named MySQLdb
</code></pre>

<p>From the PyCharm-preference, cannot find MySQLdb to import.
pymysql was successfully installed on PyCharm though.
 Suggestions ? Thank you very much. </p>

<p><a href="http://i.stack.imgur.com/ACWaY.png" rel="nofollow"><img src="http://i.stack.imgur.com/ACWaY.png" alt="enter image description here"></a>
<a href="http://i.stack.imgur.com/VOLu4.png" rel="nofollow"><img src="http://i.stack.imgur.com/VOLu4.png" alt="enter image description here"></a></p>

<p>You can use <code>pymysql</code> installing through PyCharm instead of MySQLdb. It's a drop-in replacement for it.</p>

<p><strong>Documentation:</strong>  <a href="https://github.com/PyMySQL/PyMySQL" rel="nofollow">https://github.com/PyMySQL/PyMySQL</a></p>

python mysql python-2.7 pycharm mysql-python