Chinaunix

标题: 怎么远程登录用源码包安装的MYSQL [打印本页]

作者: sungang613    时间: 2013-03-17 17:51
标题: 怎么远程登录用源码包安装的MYSQL
本帖最后由 sungang613 于 2013-03-17 18:03 编辑

[root@localhost mysql-test]# /etc/init.d/mysqld start
Starting MySQL.                                            [确定]
[root@localhost mysql-test]# cd ../bin
[root@localhost bin]# ./mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.3-m3 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql> Ctrl-C -- exit!
Aborted
[root@localhost bin]# mysql
bash: mysql: command not found
我用源码装的mysql怎么找不到这个命令?
作者: w630866139    时间: 2013-03-17 20:17
确定编译成功????????
作者: sungang613    时间: 2013-03-17 22:15
安装编译成功了用/usr/local/mysql/bin/mysql都能进入数据库了
但是直接输入mysql命令就不行
作者: aca_jingru    时间: 2013-03-17 22:47
额。。环境变量
作者: chenyx    时间: 2013-03-18 07:51
用绝对路径调用,或者将mysql的bin目录添加到PATH变量中
作者: pix77    时间: 2013-03-18 09:02
用全路径:wink:




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2