Forums

Using PHP-based MySQL admin

Hi, I'm learning how to build a web app using Django and singed up as a paid user on PythonAnywhere (PAW). I would like to use a user-friendly, GUI-based SQL manager/editor like "mywebsql http://mywebsql.net/", but it (and a whole bunch of promising GUI managers) is based in PHP. Since PAW doesn't seem to support PHP, I'm wondering what you'd suggest I use instead to look up and modify my database on a user-friendly screen. Thank you.

I thought that Django had some basic DB admin functions builtin, but since I'm not particularly familiar with it so perhaps someone else can pitch in there. I may well be mistaken.

I'm not aware of any Python equivalent to PHPAdmin or similar tools (and neither were the respondents to this SO question, it seems). Also, supporting PHP on PA has come up before, but doesn't seem likely in the short term at least.

Personally I'd suggest that time spent becoming familiar with the command-line MySQL client is time well spent - it's great for sharpening up your SQL skills. Also, you'll definitely want to be able to re-create your schema in case you need to reinstall or similar, so that should be in a separate file that you can run.

Hey there, there's no real equivalent to PHPMyAdmin for web/gui based MySQL management in the Python world, no.

The "Python way" seems to be to let your web framework do this sort of work for you. It depends on what you want to do:

  • define new database tables, and and remove columns etc (usually the programmer's job)
  • "admin user" or "super user" data entry tasks, eg adding product listings for an online shop

For the former, most web frameworks encourage you to use an ORM, to define your tables as classes, and then the ORM will take care of building tables for you. Django has its own ORM, other frameworks often use the excellent SQLAlchemy

For the latter, Django has its "admin site", which lets super-users log in and manually add or edit data in the application's tables, and it's pretty sweet. I'm not sure what other frameworks may have.

I'd recommend running through the official Django tutorial -- it zips through the ORM and the admin site pretty quickly, you should be up to scratch within a couple of hours...

Thanks for the reply (both Cartroo and harry)! What I need is for the "admin user" I am new to Django so I'll learn how to use its "admin site" and will come back to post later if I found a different solution.

Why don't you use sqlite3, this site support it.