Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Using individual database but single user login for WordPress & Q2A possible?

+2 votes
114 views
asked Dec 12, 2017 in Q2A Core by Yogendra Basnet

If I sounded little crazy, please ignore. I am not a programmer.

I was trying to add differently database for both WordPress and Q2A, database1 and database2 respectively. I did it successfully.

Added the same User to both  WordPress and Q2A database. 

database1 / user1 For Wordpress

database2 / user1 For Q2A

Result: My Q2A Crashed but Wordpress is still working

I tried this because the Q2A Wordpress integration is forcing to use same user and database as well. In my case, I want to use a different database but same user for both.

How can I achieve this?

Q2A version: 1.7.5

2 Answers

0 votes
answered Dec 12, 2017 by Scott
selected Dec 13, 2017 by Yogendra Basnet
 
Best answer
Sorry, Q2A does not support using separate databases with Wordpress integration.

Unfortunately it’s not really feasible to support because it would require multiple queries to switch databases back and forth all the time.

But there isn’t any reason to use multiple databases, you can have as many tables as you like in one DB without any problems. Wordpress and Q2A both use their own prefixes so there will never be any clashes.
commented Dec 13, 2017 by Yogendra Basnet
Actually, I read that using the same database and user will slow down the performance of the website gradually when it starts to get a larger amount of visitors. How far is it true? If it's true what will be the best solution?.
commented Dec 13, 2017 by Scott
As far as I know that’s not true. MySQL stores all the data in one giant file anyway so I don’t think there would be any benefit. MySQL allows for partitioning databases (and even tables) so if you do get a lot of visitors you can split the tables across multiple servers.

But that’s only necessary when you’re one of the most popular websites in the world. You can cross that bridge if and when you come to it.
+1 vote
answered Dec 16, 2017 by mayur
You can use Single Sign-on server to allow the user to have the same credentials. But, you can have a different set of DB.

We have WordPress site at https://softwaretestingboard.com/

and out Q2A site is at https://softwaretestingboard.com/qna/#axzz51Jy0lc6T

Here user can log-in viaPublicityPort single sign-on server https://myaccount.publicityport.com/

You can contact us if you need to use our server for single sign-on.

https://form.jotform.me/73343481880460
...