實際應用中,不僅可以先登陸mysql再使用,還可以在鏈接的時候進行sql操作,此時需要加參數-e
例:
>mysql -hlocalhost -P8080 -uroot -p123456 -e'set names utf8;use report;select * from table;';
就是這樣,-e中的語句需要用封號來分割。
例:
>mysql -hlocalhost -P8080 -uroot -p123456 -e'set names utf8;use report;select * from table;';
就是這樣,-e中的語句需要用封號來分割。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。