do migration from another pc in a lan

hi there

how can i use migrate command from another pc(windows)?

thanks a lot

Which command?

database is on another pc

i want to use for example bellow command from my pc:




yii migrate/up



or other commands that need access db

thanks

Well, either you’re modifying DB connection settings in config or executing it from where database is.

i dont want to execute it where db is, would you please describe what setting and how about modifying DB connection setting or gimme a link about a complete guide for that?

thanks

http://php.net/manual/en/ref.pdo-mysql.connection.php

i change db component like this but didnt work:




//didnt work

'dsn' => 'mysql:host=192.168.1.8;dbname=amcmcq',


//didnt work

'dsn' => 'mysql:host=http://192.168.1.8;dbname=amcmcq',


//didnt work

'dsn' => 'mysql:host=ansari-pc;dbname=amcmcq',


//didnt work

'dsn' => 'mysql:host=http://ansari-pc;dbname=amcmcq',



is anything else to config?

can i do that in sth like ssh etc ?

Your MySQL should be visible from outside + have a user that’s able to connect from anywhere in order for it to work.