I would like to connect my SAP ECC 6.0 Release 702 system to external mySQL database. What are the best ways and basic requirements/steps to connect?
See https://blogs.sap.com/2017/03/13/extracting-data-from-sap-ecc/ for details on how to get dat out of ECC.
For your target database, simply create a data store withthe right connection settings.
I have to extract data from external mySQL database to SAP.
In general, it's not supported to write straight into the SAP tables, though this can safely be done for Z-tables. In that case you have to create a 2nd data store definition on the SAP database.