Closed jklmnn closed 6 years ago
I'm not sure about SQLite but trying to create the database with MySQL leads to several problems. on many servers the user is given the credentials with the permissions to use a database only, but not to create databases. So at best creating the database could be optional.
Even then there will be one more problem: The user needs additional privileges to create the database that the 'normal' MySQL database user (as currently) doesn't need. On many servers only the MySQL user named 'root' can create tables.
To circumvent this, INSTALL.php would need to ask for two user/password combinations - making the install process more complex for the average user to understand than it currently is.
Closing this due to inactivity.
Can we create the databases in the INSTALL.php file? Since this just needs to be done once. I would also provide a init() function in the pdo class (see #38 ) that would create the table according to #47 . But due to the abstraction the database cannot be easily created there. The init() function should be called after database creation. All necessary informations should be already in the config file (because the new database connector takes the config array as second argument).