MySQL (Clear DB) on Azure in Open offer - mysql

I have purchased an Azure subscription through a reseller (so the offer is of the Azure in Open type) on which I would like to host a wordpress-based webpage (amongst other services). In order to do that I need to create a MySQL database and I would like to use a shared Clear DB for it. However, neither ClearDB nor MySQL database is available for me to be created on the subscription (these resources simply do not appear in the list). There is a credit card linked to the subscription already.
The only option Azure gives me is to create a VM with MySQL pre-installed, however the price for that is (obviously) way higher. I've checked the FAQ site for Clear DB on Azure (https://learn.microsoft.com/en-us/azure/store-cleardb-faq), but if I'm not wrong I already have the requirements fulfilled.
What settings do I have to change in order to be able to create a Clear DB instance on the subscription? Am I missing something?

Related

Can you have two Google Cloud Projects that talk to the same Cloud SQL Database?

I have just created a Project in Google Cloud, and attached a Cloud SQL Database instance to that project. I was able to deploy a Django app that is connected to that DB just fine.
However, I would like to create a separate Django app/Project that is attached to the same Cloud SQL Database that my first Django app is attached to.
Is this possible?
One Django app is responsible for web scraping and supplying constant data to the database while my second Django app (the one I have already deployed) analyzes and returns json on that data. It would be advantageous to separate the two apps because if I ever needed to revise my web scraping algorithm, the whole app would not be down.
You can use cloudsql proxy for both apps. Also as long as you authorize both of your applications with service account that have access to the cloudsql it should be fine.
You can use database that you want, in your current project or in an external one. If you use Cloud SQL proxy, the service account of your app
Either Default AppENgine service account if on App Engine
Or Compute Engine default service account
except is you have defined a specific service account on your component (Cloud Run, Compute engine)
I recommend strongly to use a specific service account on the component if it's possible (not possible with App Engine)
The role to grant on the service account is the following: roles/cloudsql.client
However, I recommend you to smartly think to your design. The current trend is to lock 1 database to 1 service (or microservice).
Think about the schema update: a synchronous update will be required between to 2 services when you update the schema or one, or the other app will fail.
Same thing in case of rollback, both apps need to be rollbacked.
If there is 2 teams, one on each app, their release planning must be sync, and you will lost in velocity and agility.
Maybe, it fits your requirement, or you can duplicate the data, inside the database (other schema). As you wish.

User storage in ejabberd

I am trying to setup ejabberd as IM solution for my project, which will be mobile app + backend. I am using SQL auth (and SQL store for all modules also), using MSSQL via ODBC. I have some questions I didnt find answered in docs.
Do I understand correctly, that ejabberd is multi-tenant (since it can support multiple domains). If so, how are users assigned to particular tenant (domain)? In users table in DB, there is only username (without domain part). Can I have two different users john#jabber.myproject.com and john#jabber.myotherproject.net ?
I want to create XMPP accounts on ejabberd automatically (user doesnt need to know anything about underlaying service) - do I need to register users via API, or can I insert rows directly into DB table users and ejabberd will be OK with it?
In users table in DB, there is only username (without domain part). Can I have two different users john#jabber.myproject.com and john#jabber.myotherproject.net ?
Create a new database for each vhost, and use the host_config option in ejabberd.yml to tell which database to use for each vhost:
https://docs.ejabberd.im/admin/configuration/#database-and-ldap-configuration
Or you can enable the new SQL schema, see https://blog.process-one.net/ejabberd-18-03/
do I need to register users via API, or can I insert rows directly into DB table users and ejabberd will be OK with it?
Both are acceptable. In the second case, there are chances that some task performed at account registration is missing in your server, but I don't remember any module that performs any task at account registration. So, it looks OK.

Visibility of databases in cloudbees?

I'm looking into using CloudBees for some application prototyping. I am using free accounts right now, I am not paying any subscriptions at the moment.
The first step for me is to create a MySQL database to host my application's data. I've done so (and it was pretty easy!). I also use Liquibase to manage the database (I've started this work using local H2 databases for the pre-prototyping), and I've been able to construct everything as expected.
As part of checking whether liquibase created the tables, I brought up the MySQL database in NetBeans. And, it did function well. But I can also see other schemas as well as the schema I just created. They're all innocently named (test, test_6hob). But, I can see the tables and view their data.
My question is around the visibility of the data that's in the CloudBees database. Is the database created for the free accounts viewable to other people connecting to the same machine? Does this change if I use a paid account? Or is it more the nature of how the database was created? I can see other schemas (and their data) but I have no idea if other people can see mine? Is there a permissions-aspect I need to ensure I set? I've fairly ignorant with the inner-workings of MySQL.
While this is a prototype, were I to move into using CloudBees for production applications, I wouldn't want the data to be visible to anyone who happened to connect to the same database as my application. It's entirely possible that I'm missing something in this new cloud world. :)
Thanks for any info
All CloudBees MySQL databases are secured separately (although will be in shared instances unless you have a dedicated server) - they are not readable by any other account by default.
However, it is possible for the database owner to grant access to users from other accounts on that same database server if you really wanted to - even though it makes very little sense to do so (and your special user configuration will be lost during a failover).
So this is what has happened for the test databases that you can see - the database owner has opened up security on those databases / tables.
This question is probably off topic but i'll bite anyway. The database data is private to your account. Actual hardware/vm's maybe shared but the data/database is not.

Add cloud-capabilities to existing application

We currently have an desktop application that is sold to small businesses and used as a server/client model application and we are in the early stages of researching the possibility of adding cloud-based syncing to the program.
Besides the obvious hurdles in transitioning/recoding the networking code of the program itself, there seem to be many additional questions related to the server/database selection, available cloud services, scalability, and more.
For example, currently the non-cloud application simply connects to a specified MySQL database file and then loads/views/updates data. This database can even be stored remotely on a server and accessed from multiple machines, for example:
db=New mySQLCommunityServer
db.host="12.23.56.57"
db.port=3306
db.databaseName="myData"
db.userName="userName"
db.Password="password1"
db.connect
But for a distributed cloud application, it would need to connect to a the same host and SQL database name but with each specific user's login and password and access their specific database and tables. Where would that translate into the code above?
A few questions arise:
Would a new entire database need to be created for each new user account that signs up?
If so, how would changes to table formatting be applied to all user databases. Assuming roughly 500-1000 users signup, having 500-1000 separate databases doesn't make much sense.
Would this be better accomplished using a service such as Amazon Web Services? Even there, it was a bit unclear how the "program user account" would translate onto their services.
Thank you for any feedback!

How to manage mysql databases created in Azure?

Azure websites let us configure our site using a new MySQL Database instead of SQL Azure. But after creation it's never visible in admin panel. I beleive that it's because is hosted in a third party server, but I have no idea how to reach it, any tip?
For managing it from an external tool check out my response here.
Though the database is hosted by a third party (ClearDB), you should see it listed as a "linked resource" on the dashboard for your Web Site in the Windows Azure portal. When you delete the Web Site, it asks if you also want to delete the linked resource.
If you choose not to or you unlink the MySQL resource explicitly, it's still there and you'll see it a list of existing resources when you subsequently do an explicit link. (I haven't found a way to see a list of the unlinked MySQL databases, but will update this response when I hear).
So I'd say to delete the MySQL database you can
Delete the entire Web Site and, when prompted, select the MySQL database to be deleted too
Unlink the MySQL database from the Web Site you want to keep; create a new temp Web Site, and add the existing MySQL database as a Linked Resource to it. Then delete the new, temp Web Site along with the linked database. Not elegant, but seems to work in my testing.
Currently you can't manage the MySQL Server.
As for being third party - yes, the service (MySQL-as-a-Service) is provided by a third party byt lives in Azure! It is not on other servers, it is on the Azure servers. Most probably (just my guess) worker roles. But as the feature is still preview, the management is missing.
The third party vendor is ClearDB. They provide MySQL as a service on top of Windows Azure. so no worries, your data is in the same Data Center (of course if you chose same) as your web site. But you can't directly manage it, unless you install something like PhpMyAdmin on your website.
I had a slightly different issue where Jim O'Neil's #2 didn't fully work because the database that was orphaned was created through the "Add-On" gallery. To work around this, you can link the orphaned database to the new temporary site as suggested, and then click on the "Manage" link in the Linked Resources tab with the database selected. This will take you to ClearDB's management for the databases.
From there, you can click on the first tab, and then click "Delete" to manually delete the database from ClearDB. This is an async operation so it may take some time, and you may also have to refresh the portal because the entries are cached.
You can also add the ClearDB Add-on and create either the Free tier or the 9.99 a month Venus 1gb tier. The Free tier is only 20mb so that isn't much. For the database name, you can type in the existing MySQL database, and ClearDB Add-on will link to that.
I know this is a super old question, but it's the first result that came up when I did a Google search for deleting mysql azure databases. You can manage your MySql databases from the management portal now, via the Linked Resources page. Either click on the name of the mysql DB directly, or select the row and click manage down at the bottom.
i know that this is a late answer but i followed them to gain the exact access
Select Your web app
Clicked linked resources
Click on mysql db name (It will redirect you to cleardb website for your account)
Install mysql workbench
click on endpoint information
in mysql workbench give the value of hostname, and access credentials i.e. username, password
and you are good to go :)