Paul's Programming Notes     Archive     Feed     Github

Clone/Copy Table Schema From One Database To Another - SQLalchemy

I got the following code from slide 36 of this slideshow:

SQLalchemy - Print Tables In Database (Show Tables)

from sqlalchemy import create_engine, Table, MetaData

engine = create_engine('mysql+mysqldb://username:password@')
metadata = MetaData(bind=engine)
print metadata.tables.keys()

You could also use that for looping through a list of the tables in the database.

Best VNC Installation Guide

That guide gave me the least amount of hassle when I installed VNC on a server. I started by trying to get it working with 13.10, but had issues with a grey screen when tightvnc connected.

"Not Found The requested URL /app/install was not found on this server." - CakePHP

Rather than dealing with my .htaccess problems to fix the error, I thought this would be a better approach:

Unfortunately, it messed up quite a few links on my site.

I ended up solving the problem by changing "AllowOverride" None to "AllowOverride All" in my /etc/apache2/sites-available/default file.

Why the heck is CakePHP using .htaccess files by default anyway? Yii has this more streamlined.