I'm setting up the WSO2 API Manager with a MySQL Cluster backend. In the /dbscripts directory within the install directory for the API Manager, there are .sql scripts for setting up the database with either the mysql.sql script, which uses InnoDB, or the mysql_cluster.sql script which uses NDB. My problem is the apimgt database, which from this article: http://docs.wso2.org/display/Cluster/Clustering+API+Manager , says to use the script in /dbscripts/apimgt/mysql.sql, but there is no equivalent script for the MySQL Cluster setup. I attempted to just replace all instances of ENGINE InnoDB with ENGINE NDB in the script, but when trying to import that into MySQL I get: ERROR 1215 (HY000) at line 82: Cannot add foreign key constraint. Does anyone know of a MySQL Cluster script for this database?
Thanks.
API Manager does not provide mysql cluster script with the pack.
For converting it to use in mysql cluster,
Yes you need to change the engine to NDB.
Also you have to remove all the forign key constraints and indexes.
Related
is there any simple way to connect an oracle apex application to another database other than apex admin database (like using WebLogic data source).
I read this but there are a lot of problem with that.
Run these commands
``
java -jar ords.war setup --database AML2
Enter number for [1] Basic [2] TNS [3] Custom URL [1]:3
Enter the Custom JDBC URL:sys/Syspass//192.168.1.1:1521/AML2
java -jar ords.war map-url --type base-path --workspace-id NEW_DB /NEW_DB AML2
``
And get success message after executing each command but when create and execute new workspace and app in the specified path (NEW_DB) get this error
The connection pool named: aml2_pu does not exist
how to resolve this problem or is there any simple or clear way to define connection in a file or WebLogic data source.
thanks for your attention
An APEX installation is in the database, it doesn't "connect to the database", there also isn't something like an "admin database" - as such, it cannot connect to other databases. Your apex application and the data for that application live in the same database instance.
However, if you want to work with data from other databases in your application you can of course do so. The "old way" is using database links, however, nowadays connecting over rest is the way to go.
The documentation you are referencing is for having ORDS pointing to multiple databases. It is possible to have a single ORDS installation point to multiple APEX instances - in a previous job we used to have dev/uat/int instance on the same ORDS instance. Each of those databases have their own apex installation.
What is the best way to go about this? I have a mobile app a project team developed whereby they setup the database as a MySQL instance. However, with this new project I have with my own developers, we believe Postgres would better suit or needs - but I want everything on one DB instance (data between the mobile app and the new project will be shared). What is the best way to accomplish this?
You will need to create a new RDS instance to switch the engine type to Postgres.
Whilst transitioning you will need to have both running, to migrate the DB across you will want to keep the data synchronised between both. Luckily AWS has the database migration service.
You should try to migrate your existing application to use this first, then remove the DMS setup and shutdown the MySQL database.
I have a large Google Cloud SQL (Second Gen) instance, and I would like to upgrade my database version from MySQL 5.6 to 5.7. But database version option is disabled on the edit instance form.
Why it is disabled, do i have to create a new instance then export and import existing database? My database is too large, and it will be a long downtime.
Per the Cloud SQL Migration docs, the only way to migrate versions is to export your data, and re-import into a new instance. The documentation mentions going from 5.5 to 5.6, but I would believe that going 5.6 to 5.7 would follow the same procedure.
Minor version upgrades to MySQL through Google Cloud now appears to be supported, though only through API calls:
https://cloud.google.com/sql/docs/mysql/upgrade-minor-db-version#gcloud
The pertinent section if using the gcloud CLI:
gcloud sql instances patch $INSTANCE_NAME --database-version=$DATABASE_VERSION
Substitute your instance name for the $INSTANCE_NAME variable, and your target database version in place of $DATABASE_VERSION.
There appear to be two REST APIs also available - see the documentation for details.
I am using WSO2 EMM 1.1.0. The documents talk about using a MySQL instead of H2 https://docs.wso2.com/display/EMM110/Setting+up+MySQL. It talks about editing the master-datasource.xml file and updating the WSO2_CARBON_DB, WSO2_EMM_DB and WSO2AM_DB databases. It then gives steps on priming those db's. But the master-datasource.xml file also contains the WSO2_IDENTITY_DB, SOCIAL_CACHE, SOCIAL_CASSANDRA_DB and JAGH2. I expect all of those can be moved to MySQL as well but I don't see the database scripts to set them up. What is the proper procedures to set up a system that uses MySQL instead of H2? Not to mention that the emm database had the database name hard coded into the setup script "USE WSO2EMM_DB" thus nullifying the master-datasource.xml file.
Thanks,
Brian
It is mentioned in this documentation[1] under the topic 'How to migrate from H2 to MySQL'
[1] - https://docs.wso2.com/display/EMM110/Upgrading+from+a+Previous+Release
You need to configure WSO2EMM_DB, WSO2AM_DB and WSO2CARBON_DB and WSO2IDENTITY_DB if you are going ahead with a larger deployment. H2 is setup just for make the out of the box experience better. You can create those DBs, Configure master_datasources.xml properly for all above DBs. And then run the server with the flag -Dsetup. It will get the configurations done automatically.
If it fails, you can also go to SERVER_HOME/dbscripts folder and find all the scripts for all above databases. Run them separately and run the server in the usual way which mentioned in our documentation.
I have a database instance on RDS with 2 databases on it. Is there a good way using the RDS command line tools to copy the one database to the other? If not, what is the recommended way of doing it?
This is not an exact solution to the OP, but if all you need is to clone an existing database for a new purpose, there's an easier way. You can take a snapshot from the original RDS instance, then restore it to a new instance. You can even use the web console.
I'd use mysqldump to get the tables and then mysql to import them.
Update 2014/07/08: Depending on what you're planning to do here, another solution today is to setup replication and then to promote the slave to be the master. That is for example if you want to update your database's release/version:
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html
If you're looking to backup externally, there's also replication:
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Exporting.NonRDSRepl.html
RDS has come a long way.
it depends on which database you are hosting there - for SQL Server I have used the SQL Azure Migration wizard (free download from CodePlex).
To get full RDBMS functionality the trick is to use the DNS name of your SQL Server instance in the wizard, but select 'SQL Server v2008' (or eventually v2012 after AWS RDS makes instances with 2012 available) and do NOT select to-->'SQL Azure'. I did a short screencast on this on my blog as well.