Forums

Database managing

Hello,

Is there anything else than the SQL console to manage the database? I use to have PhpMyAdmin but here I found nothing else than the rustic console. If there is nothing else than the console, can someone explain me how to import data from a database file? Thanks in advance.

There is currently no PHP support on PA and the main DB admin access is via a shell - see this thread for a little more info.

Importing data from a file should be straightforward, however. What format is the file in? Is it a series of SQL commands, or something like CSV or similar?

EDIT

In the case that you have a simple SQL file (as obtained by mysqldump or similar) then you can simply read it with the mysql command-line client. For example, if your database was in schema.sql then you could do it with something like this:

mysql -h mysql.server -D 'radotranonkala$default' -u radotranonkala -p < schema.sql

... where I've assumed that radotranonkala$default is the database you wish to populate and that you have a database password set (omit -p if you have no password).

If your file is in another format, you'll probably need to write a short Python script to insert it, but it's not a difficult task.

Cartroo,

Thank you for your answer. My database file is in SQL format so the line you wrote was fit for me.