This is an outdated version of the Manual. Visit the NEW Manual

Setup

So, you have decided to start with RedBeanPHP. The first thing you need to get started is setting up the database. Luckily this is really easy.


    
require('rb.php');
    
R::setup();

Yes, that's all if you are working on a *NIX, Linux or Mac system with SQLite. Here is how to connect to MySQL on any machine:


    
require('rb.php');
    
R::setup('mysql:host=localhost;
        dbname=mydatabase'
,'user','password');

RedBeanPHP is also very easy to setup for use with PostgreSQL and SQLite.

RedBeanPHP only works with the InnoDB driver for MySQL. MyISAM is too limited.


 
 

RedBeanPHP Easy ORM for PHP © 2024 Gabor de Mooij and the RedBeanPHP community - Licensed New BSD/GPLv2