Zend Framework is not the easiest framework to start application development. My best advice is to start reading the quickstart documentation, especially chapters dealing with Zend_Application, Zend_Db, Zend_Layout and of course Zend_Controller.
To answer your question, adding database configuration to application.ini isn't setting up the db connection. You should bootstrap an application resource using:
[production]
; Database (production)
resources.db.adapter = "pdo_mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "my_user_who_is_not_root"
resources.db.params.password = "my_strong_password"
resources.db.params.dbname = "accounts_db"
resources.db.isDefaultTableAdapter = true
; Other configurations
; ...
[development : production]
; Database (development settings)
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = "accounts_db_dev"
At this point, your database connection is ready to query the server.
Into your controllers (or anything else), you can retrieve the connection using:
Zend_Db_Table::getDefaultAdapter();
You could also within your Bootstrap add a reference to the connection to the Zend_Register:
protected function _initDbRegister()
{
$db = $this->bootstrap('Db')->getResource('Db');
Zend_Register::set('Zend_Db', $db);
}
Later, you could call Zend_Register::get('Zend_Db') to get the instance.