简体   繁体   中英

How to Open Schema.sql in the Blog Demo of Tornado?

I am able to execute the chat and similar basic Python projects with the command prompt, though I do not know yet how to execute a project with an SQL database.

Can somebody suggest me a way to open the SQL file schema.sql so I can have a look at the blog demo?

I am using Python 2.7 with the recent version of Tornado on Windows 7

ps

I do understand now that the SQL file is just text with SQL commands and I simply could copy and paste it, though I also see that the CREATE DATABASE command is commented out in the file so I would have to add that one too.

I am wondering which way would be good to achieve this?

I can tell by the blog.py file (when I open it) that the database connection happens to a MySQL database, thus I would not be able to use SQLite or similar.

Though I have XAMPP installed would that work? Remember that XAMPP runs on Apache while the blog demo runs on the Tornado server. Would this constellation work out properly?

If you have XAMPP running, the easiest for you would be to go in Php My Admin ( http://localhost/phpmyadmin ). Then, in the SQL tab, copy-paste the SQL file you want and press OK.

Just run the Tornado server then, and it should work fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM