Hi @Alaa Slaity ,
I'm not well versed in java but using something like string mySqlConnection = System.getenv("MYSQLCONNSTR_localdb");
should retrieve the environment variable from the app service. If you don't want to use the environment variable, you can access the kudu console (https://yourappservicename.scm.azurewebsites.net/DebugConsole) and open D:\home\data\mysql\MYSQLCONNSTR_localdb.ini and set your DriverManager.getConnection("jdbc:mysql//<connection string from *.ini>","root","");
. If you want to an Azure hosted MySQL instance, you can add your connection string as a connection string setting under appliation settings (see screen shot below). If call your setting "HostedInstance", then you can use the envrionment variable MYSQLCONNSTR_HostedInstance.
Hope this helps. Also, check https://github.com/projectkudu/kudu/wiki/MySQL-in-app for more infomration MySQL In App.