try running the MySQL command line client:

    mysql -u root -h localhost salestax

then do "show tables". that will show you what tables are in the "salestax" database.



On 03/01/2017 08:31 PM, Wilfredo Rivera wrote:
I am trying to connect to MySQL database with sqlalchemy. The connection
is succesful, but when I query the tables of the database it shows me
the wrong tables. The tables that the script shows are the ones that I
see in the MySQL for Excel extension, but not the one that is in
database that I want to connect to. The schemas showed in the MySQL for
Excel extension are different that the models that I see in the MySQL
workbench, but I don't know why.


How can I debug this problem?


|DB_USER ='root'DB_PASSWORD =''DB_HOST ='localhost'DB_MODEL
='salestax'connection_string
="mysql+pymysql://{}:{}@{}/{}".format(DB_USER,DB_PASSWORD,DB_‌​
HOST,DB_MODEL)engine =create_engine(connection_string)connection
=engine.connect()print(engine.table_names())|

|I will appreciate the help. I am a beginner trying to code a simple
application, but this got me stuck.|

|
|

--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and
Verifiable Example. See http://stackoverflow.com/help/mcve for a full
description.
---
You received this message because you are subscribed to the Google
Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sqlalchemy+unsubscr...@googlegroups.com
<mailto:sqlalchemy+unsubscr...@googlegroups.com>.
To post to this group, send email to sqlalchemy@googlegroups.com
<mailto:sqlalchemy@googlegroups.com>.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

--
SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to