title: Aiomysql pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1'")
body: <p>I'm new here and I'm having a problem. When running my code, an error occurs pymysql.err.OperationalError: (2003, &quot;Can't connect to MySQL server on 'localhost'&quot;), tell me what it might be</p>
  <pre><code>import aiomysql
  import asyncio
  
  loop = asyncio.get_event_loop()
  
  
  async def search_tel(telephone):
      conn = await aiomysql.connect(host=&quot;localhost&quot;, port=&quot;3306&quot;,
                                    user=&quot;root&quot;, password=&quot;password&quot;,
                                    db=&quot;bill&quot;, loop=loop)
      cursor = await conn.cursor()
      await cursor.execute(f&quot;SELECT TRUE FROM users WHERE telefon={telephone}&quot;)
      print(cursor.description)
      result = await cursor.fetchall()
      print(result)
      if result == 1:
          conn.close()
          return True
      else:
          conn.close()
          return False
  tel = &quot;000000000&quot;
  loop.run_until_complete(search_tel(telephone=tel))
  
  </code></pre>