I have a VPS running Ubuntu 20.04. I installed the External Database Adapter from official github link for velo-external-db using Docker and I’m able to run the service but I get a message that says it can’t connect to my MySQL database. How do I configure velo-external-db to connect and set my secret key. I’m not using Google Cloud or the others listed with detailed instructions.
Can you post a link to the github reference you are using and any relevant code that might help someone visiting this post? I have not set this up myself but can ask internally and pass along the github link to make sure there isn’t something else you should be using
Yes, it’s common for bot accounts to join and link spam so we do restrict on new members. Thanks for adding this, I will check it out and see what I can find for you
I tried to run the docker with -e to set the variables but it didn’t seem to work. Perhaps I’m not setting them right. Also not sure what all the needed variables are for this kind of deployment. Ubuntu 20.04 with docker and local MySQL. Any help would be appreciated.
Let’s try to set these set of environment variables:
CLOUD_VENDOR = 'azure' (please note that although you are not running on azure type here azure)
TYPE = 'mysql'
SECRET_KEY = '<the secret key that you will provide in the editor>'
HOST = '<the hostname or an IP address of your mysql instance>'
USER = '<mysql username>'
PASSWORD = '<mysql password>'
DB = '<the name of the database which you want to connect>'
so when you run the docker it would look something like this:
I really appreciate this. It worked! I hope your answer will help many others as well.
I’m using the docker command -p 8080:8080 to run the wix adapter on port 8080 since I have LiteSpeed running on port 80 and 443. However, I can’t make a https connection to the wix adapter and don’t know how to set this up. Any help would be appreciated.
Generally I would try to go for a reverse proxy such as Nginx. You can configure it to listen on any port you like and forward its requests to localhost:8080 (the local address of the adapter).
In Nginx’s configuration you will need to configure its ssl certificate.
But before you try this I would also check if LiteSpeed can do the same thing.
I have tested the Wix Velo External Database Adapter and it works on a KVM VPS Running Ubuntu 20.04, Nginx and MySQL 8.
The reverse proxy using Nginx worked listening on port 443 for port 8080. I installed an SSL certificate. I also had to set the CLOUD_VENDOR=aws. Lastly, I had to install MySQL 8 because MariaDB gave an error message when connecting to wix. I also had to set a MySQL User with mysql_native_password. Perhaps there are other solutions but this worked for me.
CREATE USER 'mysql_username'@'%'IDENTIFIED WITH mysql_native_password BY 'mysql_user_password';
I had to set my database to receive outside connections and then I tested to make sure I could connect with HeidiSQL before I proceed to check the velo adapters connection.
Wayne! I am so glad you were able to get this working. If you have time, I think this information would really benefit the community as a stand alone tutorial post. Please feel free to post the steps to complete a setup like this in the Tips, Tutorials category when/if you have time.