[root@localhost ~]# bin/mysql -u root -p -S/tmp/mysql.sock
-bash: bin/mysql: No such file or directory
[root@localhost ~]# bin/mysql -u root -p
-bash: bin/mysql: No such file or directory请教各位高手,这是什么问题?

解决方案 »

  1.   

    当前目录下有  bin/mysql 这个文件吗?ls ./bin/mysql 看看。
    或者把mysql命令加入环境。一般是在 /usr/bin/mysql 
    而你用root进去一般pwd是 /root
      

  2.   

    我目录下没有bin/mysql这个文件,另外怎么吧mysql命令加入环境?
      

  3.   

    先找到这个mysql执行文件。
    怎么吧mysql命令加入环境? 在你的.profile中把 mysql所在的目录加入到path中
      

  4.   


    mysql这个是文件还是文件夹,另外上面的具体怎么操作,我第一天用linux,不太熟悉,能详细一点吗,非常感谢。
      

  5.   

    我在网上查《在Linux下安装mysql的二进制源代码包》,前面操作都正常,到后面
    13.登录root,并给root授权!如下所示:
    [root@localhost local]# bin/mysql --port=3306 -u root -p -S /tmp/mysql.sock
    Enter password: 
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2
    Server version: 5.0.51a MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> grant all privileges on *.* to 'root'@'localhost' identified by 'python';
    Query OK, 0 rows affected (0.54 sec)#[给使用localhost连接的root用户以所有权限]mysql>flush privileges;
    Query OK, 0 rows affected (0.26 sec)#[刷新用户权限列表,更新权限]
    mysql> quit
    Bye
    这一步出现这个问题。
      

  6.   

    mysql 是一个命令文件。是个文件。如果这样,我建议你先找一份linux的资料看一下,掌握linux的基本操作和结构。
    然后再看一下MySQL的官方文档。http://dev.mysql.com/doc/refman/5.1/zh/index.html
    毕竟不太可以在几个贴子中就把linux或者MySQL就解释清楚。