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

Change Instruction from SQLite to MySQL #266

Closed
HassanMullah opened this issue Aug 2, 2014 · 3 comments
Closed

Change Instruction from SQLite to MySQL #266

HassanMullah opened this issue Aug 2, 2014 · 3 comments
Labels

Comments

@HassanMullah
Copy link

Hello,
i would change Baikal from SQLite to MySQL. I have only 2 Contacts since installation, so no problem to initial the database completly new. Is there any instruction how to do this ? In the backend of version 0.2.7 you see only "Use MySQL", but i think you must first create a database an tables and so on.
thanks for any help

Kind regards
Hassan

@torth
Copy link

torth commented Aug 5, 2014

hello Hassan,
Today I had the same Problem and I solved it. First follow the instructions in INSTALL.md and create a database and a db_user. After that initialize the new database baikal with the db.sql file as described. If you have no records in you calendar, it's up to you to reinstall baikal-server (that was my way) and use your new parameters to connect to your mysql database. It worked fine with my installation.

@HassanMullah
Copy link
Author

Hi torth,

thanks for your description. I have made it so:

1.) I delete my adressbook
2.) I delete my Useraccount (not the admin)
3.) I create the database with phpMyAdmin and create the user
4.) I create the different tables
5.) I create the ENABLE_INSTALL file with "touch"

In baikal admin interface i change to "Use MySQL" and cannot click the SAVE CHANGES button, but i was redirected to the URL:
https://www.fqdn.tld/baikal/admin/?/settings/system/
There was the following text posted:

exception 'Exception' with message 'SQL ERROR in: 'SHOW TABLES FROM '; Message: Array
(
[0] => 42000
[1] => 1064
[2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
)
' in /share/HDA_DATA/Web/baikal/Core/Frameworks/Flake/Core/Database.php:181
Stack trace:
#0 /share/HDA_DATA/Web/baikal/Core/Frameworks/Flake/Core/Database/Mysql.php(57): Flake\Core\Database->query('SHOW TABLES FRO...')
#1 /share/HDA_DATA/Web/baikal/Core/Frameworks/Baikal/Core/Tools.php(121): Flake\Core\Database\Mysql->tables()
#2 /share/HDA_DATA/Web/baikal/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php(108): Baikal\Core\Tools::isDBStructurallyComplete(Object(Flake\Core\Database\Mysql))
#3 [internal function]: BaikalAdmin\Controller\Settings\System->validationHook(Object(Formal\Form), Object(Formal\Form\Morphology))
#4 /share/HDA_DATA/Web/baikal/Core/Frameworks/Formal/Form.php(201): call_user_func(Array, Object(Formal\Form), Object(Formal\Form\Morphology))
#5 /share/HDA_DATA/Web/baikal/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php(46): Formal\Form->execute()
#6 /share/HDA_DATA/Web/baikal/Core/Frameworks/Flake/Core/Render/Container.php(62): BaikalAdmin\Controller\Settings\System->execute()
#7 /share/HDA_DATA/Web/baikal/Core/Frameworks/Flake/Controller/Page.php(82): Flake\Core\Render\Container->execute()
#8 /share/HDA_DATA/Web/baikal/admin/index.php(81): Flake\Controller\Page->render()
#9 {main}

Because i don't know PHP i need help here. have i used an old or to new MySQL Script for creating tables ?

Kind regards
Hassan

@netgusto
Copy link
Member

netgusto commented Nov 3, 2014

If you have no data to recover (it seems to be your case) just reinstall from scratch.

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

No branches or pull requests

3 participants