I built a windows form application using c# as a programming language and MySQL as DBMS, I want to add a button for exporting database when user click it. What I created so far is :
MySqlCommand cmd = new MySqlCommand("SELECT * FROM client INTO OUTFILE '"+path+"' FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY'\\n' ", con);
MySqlDataReader dataReader = cmd.ExecuteReader();
dataReader.Read();
But the problem is that this code export data only NOT schema of tables. Is there is any way to export database with schema by SQL statement.