I try to select data from MSSQL in MySQL over straight way. I want to store the result in a view.
What did I do now:
Add the MSSQL Server as a ODBC Datasource.
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.Sign up to join this community
MySQL won't do this. It doesn't have that feature. Sql Server, Oracle, Postgresql, and even MariaDB and MS Access all have the ability to create views which rely on remote databases of other types (including MySQL), but MySQL does not.
So, you could go the other direction, and let Sql Server create a view that uses MySQL data, but you cannot have MySQL create a view using data from Sql Server.
The only workaround is an ETL (Extract/Transform/Load) process in a cron job, the queries Sql Server and copies the data into MySQL table on some kind of schedule.