Initializing a new Odoo database
To be able to create a new database, your user must be a PostgreSQL superuser. The following command creates a PostgreSQL superuser for the current Unix user:
$ sudo createuser --superuser $(whoami)
To create a new database, use the createdb
command. Let's create a demo
database:
$ createdb demo
To initialize this database with the Odoo data schema, we should run Odoo on the empty database using the -d
option:
$ ~/odoo-dev/odoo/odoo-bin -d demo
This will take a couple of minutes to initialize a demo
database, and it will end with an INFO log message, Modules loaded.
Note
Note that it might not be the last log message, and it can be in the last three or four lines. With this, the server will be ready to listen to ...
Get Odoo 10 Development Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.