MySQL - External OS - MySQL command

External mysql command examples 


mysql -uroot -p -P 3313 -S /u03a/mysql8/data/mysql.sock <DbName> -e"select * from __tabulardata4;" > tab4.txt

There is a way of running a MySQL command from the OS command line as follows:
hostname:/u02c/mysql/binlogs # mysql -uroot -p -e"show processlist;" | grep <DbName>
Enter password:



hostname:/u02c/mysql/binlogs # mysql -uroot -p -e"show master status;" | grep <DbName>
Enter password:

Comments

Popular posts from this blog

SQL SERVER – Event ID 107- Report Server Windows Service (MSSQLSERVER) cannot connect to the report server database.

SQL Server Builds Information

Using DBCA silent install and disabling automatic memory management