NAVICAT - I cant DATA TRANSFER my Stored Procedures and Views - mysql

I am trying to use DATA TRANSFER to transfer the remote DB to a localhost Virtual Machine. The database name on the VM is the same name as the remote DB.
My problem is that the CHECKBOXES for VIEWS/STORED PROCEDURES are DIMMED and I cant select my SP's.
Please help!

SPs and Views are not data, they are part of the DB structure. Navicat Premium for MySQL has an option called Structure Synchronisation. It's in the tools menu. From there you can find options to compare Tables, Views, Functions and Events. After making a comparison of your DB, Navicat creates SQL to recreate those objects on the remote server. You can tick which of the statements you want to run if you only want to synchronise some of the objects.

Related

Obtain the mysql database handler using the database name

We have two applications that will create different databases and inserts information into it. The data is inserted into the databases using the connection handler that we obtain at the time of database creation.
Suppose database "X" is created by application 1. Is the database connection handler of database "X" available in application 2? Do we have any API in C for that?
There is a MySQL C API.
Yes, mysql stored databases according to the name, which is shared between all applications.

Migrate only Stored procedure from SQL Server to mysql automatically

When we migrate from SQL Server to mysql only table structure and data transfer, stored procedures, views and triggers don't transfer. Is there any why to transfer stored procedures and triggers using mysql migration help or any other tool? I'll be very thankful to help me. Why stored procedures and views do not transfer while I select both check boxes in ysql Workbench?:
The problem is that transferring database objects that contain code is not really straightforward and myqsl workbench does not transfer them automatically. See mysql workbench documentation on Migrating from supported databases:
Generally speaking, only table information and its data are automatically converted to MySQL. Code objects such as views, stored procedures, and triggers, are not. But supported RDBMS products will be retrieved and displayed in the wizard. You can then manually convert them, or save them for converting at a later time.
I agree, this should be made more clear in the user interface of mysql workbench. There are other migration tools that claim to be able to automatically migrate such objects between ms sql and mysql (recommending tools is out of scope, but with some google serach you will find them), but I have yet to see an application that can truly migrate complex code from one rdbms to another.

publishing Filemaker (database software) data on Wordpress website

We would like to be able to publish Filemaker data on our Wordpress website. The website is up and running and the filemaker database is set up. We do not need a live connection between both systems so we chose to export the FM data to .csv so we can import it to the mysql database on the server and from there we would like to display in on the website.
Now are my questions, since this kind of development is new to us:
can I setup an automated import to the mysql database from a source like dropbox or something? For example can we make the mysql database import and overwrite the existing database each 24 hours from a .csv file located somewhere? We need this automated overwrite option because the FM data changes often and we need up to date info on the website)
How can we display the data from the mysql database on the WP frontend?
I've been looking into this myself and couldn't find any clear answers or guides. Can you guys point me in the right direction?
(btw, I know there are table plugins I can use for WP but they do not fulfill our needs, and I think it's exciting to do it all by ourself with help from this great community)
Update 01
I've successfully connected FM with my MySQL db using ODBC and can now select tables from the MySQL db in FM's relational graph.
I was wondering how I can write the data from my existing FM file to the MySQL db using ODBC, can anybody help me on this?
I would like to display the data in some MySQL tables so I can fetch them using php on my website.
Thanks!
It is possible to write directly into (and read from) a remote MySQL database from FileMaker via ODBC.
You need an MySQL account which allows remote access. There are providers where this is not allowed.
On the local box the odbc driver needs to be installed. On Win you can use the open source version (http://dev.mysql.com/downloads/connector/odbc/), on Mac it works better with the Actual Tech (http://www.actualtech.com/de/product_opensourcedatabases.php) drivers.
An odbc system dsn (not user dsn) is set up. Be sure to use the 32-bit odbc manager on Win.
Now you can create the external data source within FileMaker and read and write into MySQL tables.
Once you have made the connection to the MySQL database, and you can see the shadow tables, you can write to the fields directly via Filemaker layouts. It's as simple as that.
Once the layout contains the fields from the MySQL database you can move through records, find stuff all as if the data were native in your FM database. Of course, for more automated processing, you can create scripts, relationships etc and manipulate/synchronise data. Be warned though, the connection speed can limit complex relationships and large databases. I would advise 'baby steps'.

Create a simplified versions of a database onto another server

I am required to create a test environment for some of our .Net applications, and some of these applications use only a small portion of some rather large databases. My idea is to create a 'small' database, which would only hold the tables, stored procedures, views, etc... that are being used by the application.
This will hopefully speed up refresh time on these 'small' databases, however I can't see a simple way of doing this, is there an option to do this easily within SQL server, or via a T-SQL script.
Currently the best method I have is to generate a script from the database, and only select the tables I require with the 'data only' option selected, then run these on the 'small' database to get the data up to date. However this as you can imagine is a lengthy process and I would prefer to use something a bit more automated.
Any suggestions you can provide are very much appreciated.
Thanks,
Michael Tempest
Database Mirroring Can be a solution for this problem, Only publish the items/Articles you want on your test Database, You can pause and restart mirroring when needed.
SSMS Script as Another wasy way would be go to your SSMS right click the objects you want to copy to test database and Script as Create, do it for all the items you want to move save the scripts in right order i.e (Creating Tables 1st and then relating objects) in one file and run it on the target database.
Since its only you who knows what items to move over to test db I think it will be difficult to find a script which suits your needs.
Some Useful tips for using SCRIPT AS Option
To generate the sql script for the objects:
SQL Server Management Studio > Databases > Database1 > Tasks >
Generate Scripts...
The SQL Server Scripts Wizard will start and
you can choose the objects and settings to export into scripts
By default the scripting of Indexes and Triggers are not
included so make sure to trun these on (and any others that you
are interested in).
To export the data from the tables:
SQL Server Management Studio > Databases > Database1 > Tasks >
Export Data...
Choose the source and destination databases
Select the tables to export •Make sure to check the Identity Insert
checkbox for each table so that new identities are not created.
Then create the new database, run the scripts to create all of the objects, and then import the data.
For Dev database we just keep a structural copy of Production one with some data. Periodically we compare databases with tool that compares and syncs database structure (there are plenty of such tools now - we use redgate's one).
For prod_copy database we just do backup-restore of prod db and then truncate biggest tables and shrink database if needed.
If you want completely automate the procedure you can script both SQL Compare or SQL Data Compare. I am not sure if other SQL tools vendors have such an option.

How to hide my store procedure and function script from user in mysql

Currently I am using MYSQL 5.6 database.
I have so many store procedures and functions in one database say database "AppDatabase" for my application which I am developing right now.
What I want to gain is :
Only my program should have all rights for "AppDatabase". I want to prevent any database user to view my store procedures and functions. Even database administrator should not be able to view any store procedure and any function.
I want to secret my database store procedure and function code.
Is it possible to achieve in mysql?
You can check out the Access Control for Stored Programs and Views