Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Config connect to MariaDB

Lê Chí Dũng edited this page Dec 3, 2017 · 2 revisions

👻👻👻 Hello some one read me! Let's go step by step below 👽👽👽

  1. 👣Change directory to path project: phalcon-lcd-cms/app/config/system/
    In direct you see 3 config of 3 environment:
  • system_pro.php apply for Production
  • system_sta.php apply for staging
  • system_dev.php apply for development
  • system_migration.php apply for migration DB (Update runtime for environment in here: )
  1. 👣Content of config:

return array(
 'app' => array(
 // project name
 'app_name' => 'LCD-CMS',
 // version number
 'version' => '0.1',
 // Root namespace
 'root_namespace' => 'Lcd',
 // Foreground configuration
 'frontend' => array(
 // The pathname of the module in the URL
 'module_pathinfo' => '/',
 // Controller path
 'controllers' => ROOT_PATH . '/app/frontend/controllers/',
 // View path
 'views' => ROOT_PATH . '/app/frontend/views/',
 // Whether to compile the template in real time
 'is_compiled' => false,
 // Template path
 'compiled_path' => ROOT_PATH . '/app/cache/compiled/frontend/',
 ),
 // Background configuration
 'backend' => array(
 // The pathname of the module in the URL
 'module_pathinfo' => '/backend/',
 // Controller path
 'controllers' => ROOT_PATH . '/app/backend/controllers/',
 // View path
 'views' => ROOT_PATH . '/app/backend/views/',
 // Whether to compile the template in real time
 'is_compiled' => false,
 // Template path
 'compiled_path' => ROOT_PATH . '/app/cache/compiled/backend/',
 // Background static resource URL
 'assets_url' => '/backend/',
 ),
 // Class library path
 'libs' => ROOT_PATH . '/app/libs/',
 // Log root directory
 'log_path' => ROOT_PATH . '/app/cache/logs/',
 // Cache path
 'cache_path' => ROOT_PATH . '/app/cache/data/',
 'migrations' => ROOT_PATH . '/app/migrations/',
 ),
 // Database configuration
 'database' => array(
 // Database connection information
 'db' => array(
 'host' => 'localhost',
 'port' => 3306,
 'username' => 'root',
 'password' => 'your-pass',
 'dbname' => 'lcd-cms-pro',
 'charset' => 'utf8',
 ),
 // Table prefix
 'prefix' => '',
 ),
);

You can update database connection to connect to you DB.
And migration:

return new \Phalcon\Config([
 'database' => [
 'adapter' => 'Mysql',
 'host' => 'localhost',
 'port' => 3306,
 'username' => 'root',
 'password' => 'your-pass',
 'dbname' => 'lcd-cms',
 'charset' => 'utf8',
 ]
]);

Final, thanks to view my document! 🙇🙇🙇🙇

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /