I wanted to install a single instance of craft on my local machine. However upon starting the installation via calling
/admin/install, the only message I get, is
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected The SQL being executed was: SHOW TABLES LIKE 'craft_%'
Which in itself is weird, since I have modified the configuration already to not use craft_ as a table prefix.
These are my settings:
- OS: Mac OS X 10.11.3 (El Capitan)
- PHP 5.6.25
- MySQL 5.7.14
- Apache 2.4.16
- Latest Craft 2 build from today / Latest Craft 3 build from today
I have made the following changes to the configuration:
return [ '.local' => [ // The database server name or IP address. Usually this is 'localhost' or '127.0.0.1'. 'server' => '127.0.0.1', // The database username to connect with. 'user' => 'root', // The database password to connect with. 'password' => '', // The name of the database to select. 'database' => 'craft_cms', // The prefix to use when naming tables. This can be no more than 5 characters. 'tablePrefix' => '', ], ];
return [ '.local' => [ 'devMode' => true, ], '*' => [ 'omitScriptNameInUrls' => true, ], ];
I even went the extra mile and updated the my.cnf for mysql in order to work properly in 5.7:
Edit Since the mods removed the craft3 tag due to my typo, I thought it was necessary to say that this error occurs on both the latest version of craft3 and craft2.