开发者

Connect from shell to MySQL

开发者 https://www.devze.com 2023-04-01 01:39 出处:网络
I want to connect to my MySQL database from my shell. But my database is hosted on another computer, so normally I could do:

I want to connect to my MySQL database from my shell.

But my database is hosted on another computer, so normally I could do:

mysql -h [hostadres] -u [username] -p [password]

But when I enter this, the promt asks me "Enter password:", I fill it in again, 开发者_运维知识库but then there's hapening nothing...

I give in exactly the same values as inside my php mysql_connect(...) code.

Please help...


I think the problem is the spaces between the flagnames and values, try this:

mysql -h[hostadres] -u[username] -p[password]
0

精彩评论

暂无评论...
验证码 换一张
取 消