Batch file to connect mysql and run commands

后端 未结 3 389
闹比i
闹比i 2021-01-24 05:47

I want to run a batch file from windows, which connect to mysql server on different machine, and run a procedure from database or run a sql file which is sitting in my local mac

3条回答
  •  失恋的感觉
    2021-01-24 06:29

    do I have to define the server info (e.g IP address & port) how do I do that

    You need to set port if it is not 3306. You need to set host if you want to specify user you want to connect, as you know MySQL user has a name and host - 'user1'@'host_name'.

    See the manual - The MySQL Command-Line Tool

提交回复
热议问题