Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f3-cms using mysql database instead of sqlite #4

Open
eliargon opened this issue Oct 31, 2022 · 1 comment
Open

f3-cms using mysql database instead of sqlite #4

eliargon opened this issue Oct 31, 2022 · 1 comment

Comments

@eliargon
Copy link

I would love to see some code that will show how the setup.sql is modified so it works with mysql database.
I know how the controller $db should be
$db= new DB\SQL("mysql:host=".DATABASE_HOST.";port=3306;dbname=".DATABASE_NAME,DATABASE_USER,DATABASE_PASS,
array(PDO::MYSQL_ATTR_LOCAL_INFILE => true,));
$this->db = $db;
But I never used sqlite and spent too much time trying to modify setup.sql to work.
Thanks in advance.

@n0nag0n
Copy link
Member

n0nag0n commented Oct 31, 2022

There are online tools that could easily convert that. A quick google shows https://www.rebasedata.com/convert-sqlite-to-mysql-online and https://stackoverflow.com/questions/6710630/convert-sqlite-file-into-mysql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants