PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Jun 19, 2019 7:12 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Sep 14, 2016 2:18 am 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 331
Hey guys i am using the bolt CMS and basially the database config file is a YML file that looks like below:

Syntax: [ Download ] [ Hide ]
# Database setup. The driver can be either 'sqlite', 'mysql' or 'postgres'.
#
# For SQLite, only the databasename is required. However, MySQL and PostgreSQL
# also require 'username', 'password', and optionally 'host' ( and 'port' ) if the database
# server is not on the same host as the web server.
#
# If you're trying out Bolt, just keep it set to SQLite for now.
database:
    driver: mysqli
    databasename: bolt


If i keep these settings and navigate to http://localhost:8080/bolt/public/ ,

i can see the login screen , but i want to be using MySql and so i change the settings to the following:

Syntax: [ Download ] [ Hide ]
# Database setup. The driver can be either 'sqlite', 'mysql' or 'postgres'.
#
# For SQLite, only the databasename is required. However, MySQL and PostgreSQL
# also require 'username', 'password', and optionally 'host' ( and 'port' ) if the database
# server is not on the same host as the web server.
#
# If you're trying out Bolt, just keep it set to SQLite for now.
database:
    driver: MySQL
    databasename: bolt
    host: localhost
    username: root
    password:


Now i get the following screen:

http://imgur.com/E6GBkll


I'll paste the error below too:

Syntax: [ Download ] [ Hide ]
Fatal error: Uncaught exception 'Bolt\Exception\LowLevelDatabaseException' with message 'MySQL was selected as the database type, but it is not supported.' in C:\xampp\htdocs\bolt\vendor\bolt\bolt\src\Exception\LowLevelDatabaseException.php:41 Stack trace: #0 C:\xampp\htdocs\bolt\vendor\bolt\bolt\src\Configuration\LowlevelChecks.php(188): Bolt\Exception\LowLevelDatabaseException::unsupportedDriver('MySQL') #1 C:\xampp\htdocs\bolt\vendor\bolt\bolt\src\Configuration\ResourceManager.php(451): Bolt\Configuration\LowlevelChecks->doDatabaseCheck() #2 C:\xampp\htdocs\bolt\vendor\bolt\bolt\src\Configuration\ResourceManager.php(412): Bolt\Configuration\ResourceManager->verifyDb() #3 C:\xampp\htdocs\bolt\vendor\bolt\bolt\src\Configuration\ResourceManager.php(395): Bolt\Configuration\ResourceManager->postInitialize() #4 C:\xampp\htdocs\bolt\vendor\bolt\bolt\src\Application.php(59): Bolt\Configuration\ResourceManager->initialize() #5 C:\xampp\htdocs\bolt\vendor\bolt\bolt\app\bootstrap.php(123): Bolt\Application->__construct(Array) #6 in C:\xampp\htdocs\bolt\vendor\bolt\bolt\src\Exception\LowLevelDatabaseException.php on line 41


Any idea how i can get MySql working with bolt ?

Thank you.


Top
 Profile  
 
PostPosted: Wed Sep 14, 2016 4:35 am 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 331
because my driver name was incorrect. :P

Use
Syntax: [ Download ] [ Hide ]
driver: mysql


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group