请问我在连接数据库输入:mysql> mysql -h192.168.1.8 -uroot -proot;
出现如下的错误:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
 -h192.168.1.8 -uroot -proot' at line 1
mysql>
请高手指点一下,谢谢!

解决方案 »

  1.   

    不能在MYSQL命令行下输入上边的命令,应该在操作系统的命令行提示符下输入
      

  2.   

    cmd下 mysql -hxxxxx -uroot -p
    或者linux命令行下,不是在mysql服务器里执行
      

  3.   

    C:\Documents and Settings\Administrator>mysql -h119.61.99.211 -uroot -pgroupon1@3$
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 10
    Server version: 5.1.59-community-log MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql-[(none)]>
      

  4.   

    mysql -h192.168.1.8 -uroot -proot是在dos或者shell环境下输入的
      

  5.   

    是的不能在mysql命令下输入这种命令,wondows中在cmd下用哪个,linux在客户端用
      

  6.   

    本地DB远程链接外部DB可以写 存储过程实现 来远程操作 
      

  7.   

    mysql -h192.168.1.8 -uroot -proot;这个是操作系统命令。不是在MYSQL中使用的。 MYSQL中除非用 FEDERATED存储引擎,你无法访问远程数据库上的表。