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:
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