Check out useful posts regarding MySQL optimization
How to Backup/Restore/Crate/Drop the MYSQL Data Base through the Command Prompt?
how to optimize the Stored Procedure?
how to avoid the Cursors inside the Stored procedure?
Even we can store the result to file
To run the query directly from the command Prompt:
mysql –u[Username] –p[Password] -e "select * from tbl_emp where emp_id=2" [DataBaseName]
‘-e’ :- execute the queryEven we can store the result to file
mysql –u[Username] –p[Password] -e "select * from tbl_emp where emp_id=2" [DataBaseName] > D:\test.log
To run the Sql Queries file through the command prompt:
The sql file can contain any kind of quires like select/update/sp call etc…
mysql –u[Username] –p[Password] –h[IP Address] [DataBaseName] < "D:\Test.sql"
To store the output to log/text file:
mysql –u[Username] –p[Password] –h[IP Address] [DataBaseName] < "D:\Test.sql" > "D:\Test.log"
1 comments:
Thanks for the advice!
Respects for your's Questions & Opinions