请高手帮看下3306端口的问题 我在linux里装了mysql,但是netstat后没有看到3306端口打开,网上说是没打开3306端口,要找到skip-networking这一行注释了,但在my.cnf中根本没有这一行.请高手帮想想办法,急等... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你的mysqld 有没有运行啊? ps 看一下这个进程 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMANDroot 1 0.0 0.0 3324 548 ? S 08:25 0:00 init [5] root 2 0.0 0.0 0 0 ? SN 08:25 0:00 [ksoftirqd/0]root 3 0.0 0.0 0 0 ? S< 08:25 0:00 [events/0]root 4 0.0 0.0 0 0 ? S< 08:25 0:00 [khelper]root 5 0.0 0.0 0 0 ? S< 08:25 0:00 [kacpid]root 14 0.0 0.0 0 0 ? S< 08:25 0:00 [kblockd/0]root 15 0.0 0.0 0 0 ? S 08:25 0:00 [khubd]root 32 0.0 0.0 0 0 ? S 08:25 0:00 [pdflush]root 33 0.0 0.0 0 0 ? S 08:25 0:00 [pdflush]root 34 0.0 0.0 0 0 ? S 08:25 0:00 [kswapd0]root 35 0.0 0.0 0 0 ? S< 08:25 0:00 [aio/0]root 181 0.0 0.0 0 0 ? S 08:25 0:00 [kseriod]root 418 0.0 0.0 0 0 ? S 08:25 0:00 [kjournald]root 1059 0.0 0.0 0 0 ? S< 08:25 0:00 [kauditd]root 1682 0.0 0.0 1856 456 ? S<s 08:25 0:00 udevdroot 1932 0.0 0.0 0 0 ? S< 08:25 0:00 [kmpathd/0]root 2017 0.0 0.0 0 0 ? S 08:25 0:00 [kjournald]root 2551 0.0 0.0 2380 532 ? Ss 08:26 0:00 syslogd -m 0root 2555 0.0 0.0 2608 380 ? Ss 08:26 0:00 klogd -xrpc 2578 0.0 0.0 2484 548 ? Ss 08:26 0:00 portmaprpcuser 2598 0.0 0.0 3572 712 ? Ss 08:26 0:00 rpc.statdroot 2627 0.0 0.0 4920 500 ? Ss 08:26 0:00 rpc.idmapdroot 2705 0.0 0.0 3136 464 ? S 08:26 0:00 /usr/sbin/smartdroot 2715 0.0 0.0 1636 424 ? Ss 08:26 0:00 /usr/sbin/acpidroot 2746 0.0 0.2 11200 3628 ? Ss 08:26 0:00 cupsdroot 2800 0.0 0.0 4596 1144 ? Ss 08:26 0:00 /usr/sbin/sshdroot 2815 0.0 0.0 2772 796 ? Ss 08:26 0:00 xinetd -stayaliveroot 2834 0.0 0.1 8976 1952 ? Ss 08:26 0:00 sendmail: acceptismmsp 2843 0.0 0.1 8056 1624 ? Ss 08:26 0:00 sendmail: Queue rroot 2854 0.0 0.0 2748 344 ? Ss 08:26 0:00 gpm -m /dev/inputhtt 2885 0.0 0.0 1704 128 ? Ss 08:26 0:00 /usr/sbin/htt -rehtt 2886 0.0 0.1 8696 2928 ? S 08:26 0:00 htt_server -nodaecanna 2898 0.0 1.1 18972 17448 ? Ss 08:26 0:00 /usr/sbin/cannaseroot 2910 0.0 0.0 5304 912 ? Ss 08:26 0:00 crondxfs 2945 0.0 0.2 6224 3436 ? Ss 08:26 0:00 xfs -droppriv -daroot 2955 0.0 0.0 2080 484 ? SNs 08:26 0:00 anacron -sroot 2964 0.0 0.0 1928 424 ? Ss 08:26 0:00 /usr/sbin/atddbus 2983 0.0 0.0 3936 812 ? Ss 08:26 0:00 dbus-daemon-1 --sroot 2996 0.0 0.0 3600 904 ? Ss 08:26 0:00 cups-config-daemoroot 3007 0.0 0.1 5548 2428 ? Ss 08:26 0:00 haldroot 3094 0.0 0.0 3004 416 tty1 Ss+ 08:26 0:00 /sbin/mingetty ttroot 3137 0.0 0.0 2500 416 tty2 Ss+ 08:26 0:00 /sbin/mingetty ttroot 3184 0.0 0.0 3036 416 tty3 Ss+ 08:26 0:00 /sbin/mingetty ttroot 3230 0.0 0.0 1860 416 tty4 Ss+ 08:26 0:00 /sbin/mingetty ttroot 3268 0.0 0.0 2556 412 tty5 Ss+ 08:26 0:00 /sbin/mingetty ttroot 3309 0.0 0.0 3036 416 tty6 Ss+ 08:26 0:00 /sbin/mingetty ttroot 3349 0.0 0.1 11576 2316 ? Ss 08:26 0:00 /usr/bin/gdm-binaroot 3812 0.0 0.1 12216 2288 ? S 08:26 0:00 /usr/bin/gdm-binaroot 3841 0.0 0.5 11624 8392 ? S 08:26 0:00 /usr/X11R6/bin/X gdm 3994 0.0 0.8 59384 13724 ? Ss 08:26 0:01 /usr/bin/gdmgreetroot 3995 0.0 0.1 8244 2316 ? Ss 08:27 0:00 sshd: root@notty root 3997 0.0 0.0 4672 1228 ? Ss 08:27 0:00 /usr/libexec/openroot 4014 0.0 0.1 7400 2500 ? Ss 08:27 0:00 sshd: root@pts/1 root 4016 0.0 0.0 5032 1376 pts/1 Ss 08:27 0:00 -bashroot 4061 0.0 0.1 7988 2320 ? Ss 08:42 0:00 sshd: root@notty root 4063 0.0 0.0 4636 1220 ? Ss 08:42 0:00 /usr/libexec/openroot 4104 0.0 0.0 3216 764 pts/1 R+ 08:55 0:00 ps -aux是不是mysql没有运行啊! 是的,用 service mysqld start 启一下试试。 启动后,看到mysql打开了,紧接着linux死机了...linux机有时候启动不起来... 检查错误日志。或者用 mysqld_safe 启一下试试。 ACMAIN_CHM大哥我启动mysql后,netstat仍然没有看到有3306端口Active Internet connections (w/o servers)Proto Recv-Q Send-Q Local Address Foreign Address State getnameinfo failedgetnameinfo failedtcp 0 72 [UNKNOWN]:ssh [UNKNOWN]:1324 ESTABLISHED getnameinfo failedgetnameinfo failedtcp 0 0 [UNKNOWN]:ssh [UNKNOWN]:1305 ESTABLISHED Active UNIX domain sockets (w/o servers)Proto RefCnt Flags Type State I-Node Pathunix 2 [ ] DGRAM 6651 @/var/run/hal/hotplug_socketunix 11 [ ] DGRAM 5543 /dev/logunix 2 [ ] DGRAM 3642 @udevdunix 2 [ ] DGRAM 9268 unix 3 [ ] STREAM CONNECTED 8857 unix 3 [ ] STREAM CONNECTED 8856 unix 3 [ ] STREAM CONNECTED 8855 unix 3 [ ] STREAM CONNECTED 8854 unix 3 [ ] STREAM CONNECTED 8772 /tmp/.X11-unix/X0unix 3 [ ] STREAM CONNECTED 8771 unix 3 [ ] STREAM CONNECTED 8770 /tmp/.X11-unix/X0unix 3 [ ] STREAM CONNECTED 8769 unix 3 [ ] STREAM CONNECTED 8753 /tmp/.font-unix/fs7100unix 3 [ ] STREAM CONNECTED 8752 unix 3 [ ] STREAM CONNECTED 8757 /tmp/.X11-unix/X0unix 3 [ ] STREAM CONNECTED 8669 unix 2 [ ] DGRAM 7625 unix 3 [ ] STREAM CONNECTED 6650 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 6649 unix 3 [ ] STREAM CONNECTED 6524 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 6523 unix 3 [ ] STREAM CONNECTED 6500 unix 3 [ ] STREAM CONNECTED 6499 unix 2 [ ] DGRAM 6440 unix 2 [ ] DGRAM 6345 unix 2 [ ] DGRAM 6252 unix 2 [ ] DGRAM 6236 unix 2 [ ] DGRAM 6215 unix 2 [ ] DGRAM 6158 unix 3 [ ] STREAM CONNECTED 5728 unix 3 [ ] STREAM CONNECTED 5727 unix 2 [ ] DGRAM 5612 unix 2 [ ] DGRAM 5551 先确认你的mysqld 已经启来了。[code=BatchFile][root@xx ~]# ps -aux | grep mysqldBad syntax, perhaps a bogus '-'?root 19721 0.0 0.1 4236 1232 ? S Apr10 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnfmysql 19748 0.0 1.7 123412 18244 ? S Apr10 0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sockroot 10583 0.0 0.0 2892 464 pts/1 S 21:17 0:00 grep mysqld[root@xx ~]#[/code] 我这边ps -aux | grep mysqld-bash: [root@localhost: command not found[root@localhost ~]# Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQl/mysql5.0.45/bin/mysqld_safe --user=root-bash: Warning:: command not found[root@localhost ~]# root 4072 0.0 0.0 6008 1068 pts/1 S 06:08 0:00 /bin/sh /usr/local/mysql5.0.45/bin/mysqld_safe --user=root-bash: root: command not found[root@localhost ~]# root 4098 0.0 0.8 109060 12524 pts/1 Sl 06:08 0:00 /usr/local/mysql5.0.45/libexec/mysqld --basedir=/usr/local/mysql5.0.45 --datadir=/usr/local/mysql5.0.45/var --user=root --pid-file=/usr/local/mysql5.0.45/var/localhost.localdomain.pid --skip-external-locking --port=3306 --socket=/tmp/mysql.sock-bash: root: command not found[root@localhost ~]# root 4189 0.0 0.0 4708 636 pts/1 R+ 06:18 0:00 grep mysqld [root@localhost ~]# service mysqld start鍚姩 MySQL锛?[ 纭畾 ][root@localhost ~]# ps -aux | grep mysqld Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQroot 4058 0.0 0.0 5616 1228 pts/1 S 06:32 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pidmysql 4086 0.4 1.0 117312 16984 pts/1 Sl 06:32 0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/tmp/mysql.sockroot 4104 0.0 0.0 4412 644 pts/1 S+ 06:33 0:00 grep mysqld 楼主啊,看来你要先学习一下linux的操作。下面黑体部分是命令,需要你输入后按回车。[root@xx ~]# ps -aux | grep mysqld [root@localhost ~]# ps -aux | grep mysqldWarning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQroot 4058 0.0 0.0 5616 1228 pts/1 S 06:32 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pidmysql 4086 0.0 1.1 117336 17168 pts/1 Sl 06:32 0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/tmp/mysql.sockroot 4111 0.0 0.0 4124 636 pts/1 R+ 06:38 0:00 grep mysqld 恩上面是我启动mysql服务后,输入ps -aux | grep mysqld后按回车出来的结果 应该已经好了,你看不到3306是因为你现在还没有联接,用这个命令选项。netstat -an | grep 3306现在你可以直接 [root@wuxsx008 ~]# mysql -uroot 联接你的mysql 了建议先看一下官方文档中的教程。MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html 现在可以可以看到3306端口了,多谢ACMAIN_CHM大牛啊[root@localhost ~]# netstat -anActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:669 0.0.0.0:* LISTEN tcp 0 0 192.168.1.153:3306 192.168.1.179:1092 ESTABLISHED tcp 0 0 :::22 :::* LISTEN tcp 0 0 ::ffff:192.168.1.153:22 ::ffff:192.168.1.179:3335 ESTABLISHED tcp 0 0 ::ffff:192.168.1.153:22 ::ffff:192.168.1.179:2695 ESTABLISHED udp 0 0 0.0.0.0:663 0.0.0.0:* udp 0 0 0.0.0.0:666 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* udp 0 0 0.0.0.0:631 0.0.0.0:* Active UNIX domain sockets (servers and established)Proto RefCnt Flags Type State I-Node Pathunix 2 [ ACC ] STREAM LISTENING 6268 /dev/gpmctlunix 2 [ ] DGRAM 7856 @/var/run/hal/hotplug_socketunix 2 [ ACC ] STREAM LISTENING 5882 /var/run/acpid.socketunix 2 [ ACC ] STREAM LISTENING 6329 /var/run/.iroha_unix/IROHAunix 2 [ ACC ] STREAM LISTENING 6331 /var/run/iiim/.iiimp-unix/9010unix 2 [ ACC ] STREAM LISTENING 6512 /var/run/dbus/system_bus_socketunix 2 [ ] DGRAM 3640 @udevdunix 11 [ ] DGRAM 5558 /dev/logunix 2 [ ACC ] STREAM LISTENING 6439 /tmp/.font-unix/fs7100unix 2 [ ACC ] STREAM LISTENING 8271 /tmp/.gdm_socketunix 2 [ ACC ] STREAM LISTENING 8387 /tmp/.X11-unix/X0unix 2 [ ACC ] STREAM LISTENING 8764 /tmp/ssh-wulLuA3991/agent.3991unix 2 [ ACC ] STREAM LISTENING 8866 /tmp/mysql.sockunix 2 [ ] DGRAM 16202 unix 3 [ ] STREAM CONNECTED 10932 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 10931 unix 3 [ ] STREAM CONNECTED 9139 unix 3 [ ] STREAM CONNECTED 9138 unix 3 [ ] STREAM CONNECTED 9137 unix 3 [ ] STREAM CONNECTED 9136 unix 3 [ ] STREAM CONNECTED 8727 /tmp/.X11-unix/X0unix 3 [ ] STREAM CONNECTED 8726 unix 3 [ ] STREAM CONNECTED 8725 /tmp/.X11-unix/X0unix 3 [ ] STREAM CONNECTED 8724 unix 3 [ ] STREAM CONNECTED 8708 /tmp/.font-unix/fs7100unix 3 [ ] STREAM CONNECTED 8707 unix 3 [ ] STREAM CONNECTED 8712 /tmp/.X11-unix/X0unix 3 [ ] STREAM CONNECTED 8427 unix 2 [ ] DGRAM 8120 unix 3 [ ] STREAM CONNECTED 7855 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 7854 unix 3 [ ] STREAM CONNECTED 6539 /var/run/dbus/system_bus_socketunix 3 [ ] STREAM CONNECTED 6538 unix 3 [ ] STREAM CONNECTED 6515 unix 3 [ ] STREAM CONNECTED 6514 unix 2 [ ] DGRAM 6455 unix 2 [ ] DGRAM 6360 unix 2 [ ] DGRAM 6267 unix 2 [ ] DGRAM 6251 unix 2 [ ] DGRAM 6230 unix 2 [ ] DGRAM 6173 unix 3 [ ] STREAM CONNECTED 5743 unix 3 [ ] STREAM CONNECTED 5742 unix 2 [ ] DGRAM 5627 unix 2 [ ] DGRAM 5566 一个产品对应多个属性 一条属性一条记录 多个属性和属性值复合检索 请高人指点 在线等! 问个比较弱的问题!! 如何根据某列的值的不同以不同别名查出结果集 mysql索引能否实现如此的功用? mysql ODBC 问题 请教一个触发器的写法 头一回来,小的给各位请安了! 请问一个与mysql数据库连接的问题 如何将一个装有数据的文本写入到数据库中,高分求教!!!!! 数据库恢复问题。 关于PL/SQL的一些问题 mysql 求一查询语句
root 1 0.0 0.0 3324 548 ? S 08:25 0:00 init [5]
root 2 0.0 0.0 0 0 ? SN 08:25 0:00 [ksoftirqd/0]
root 3 0.0 0.0 0 0 ? S< 08:25 0:00 [events/0]
root 4 0.0 0.0 0 0 ? S< 08:25 0:00 [khelper]
root 5 0.0 0.0 0 0 ? S< 08:25 0:00 [kacpid]
root 14 0.0 0.0 0 0 ? S< 08:25 0:00 [kblockd/0]
root 15 0.0 0.0 0 0 ? S 08:25 0:00 [khubd]
root 32 0.0 0.0 0 0 ? S 08:25 0:00 [pdflush]
root 33 0.0 0.0 0 0 ? S 08:25 0:00 [pdflush]
root 34 0.0 0.0 0 0 ? S 08:25 0:00 [kswapd0]
root 35 0.0 0.0 0 0 ? S< 08:25 0:00 [aio/0]
root 181 0.0 0.0 0 0 ? S 08:25 0:00 [kseriod]
root 418 0.0 0.0 0 0 ? S 08:25 0:00 [kjournald]
root 1059 0.0 0.0 0 0 ? S< 08:25 0:00 [kauditd]
root 1682 0.0 0.0 1856 456 ? S<s 08:25 0:00 udevd
root 1932 0.0 0.0 0 0 ? S< 08:25 0:00 [kmpathd/0]
root 2017 0.0 0.0 0 0 ? S 08:25 0:00 [kjournald]
root 2551 0.0 0.0 2380 532 ? Ss 08:26 0:00 syslogd -m 0
root 2555 0.0 0.0 2608 380 ? Ss 08:26 0:00 klogd -x
rpc 2578 0.0 0.0 2484 548 ? Ss 08:26 0:00 portmap
rpcuser 2598 0.0 0.0 3572 712 ? Ss 08:26 0:00 rpc.statd
root 2627 0.0 0.0 4920 500 ? Ss 08:26 0:00 rpc.idmapd
root 2705 0.0 0.0 3136 464 ? S 08:26 0:00 /usr/sbin/smartd
root 2715 0.0 0.0 1636 424 ? Ss 08:26 0:00 /usr/sbin/acpid
root 2746 0.0 0.2 11200 3628 ? Ss 08:26 0:00 cupsd
root 2800 0.0 0.0 4596 1144 ? Ss 08:26 0:00 /usr/sbin/sshd
root 2815 0.0 0.0 2772 796 ? Ss 08:26 0:00 xinetd -stayalive
root 2834 0.0 0.1 8976 1952 ? Ss 08:26 0:00 sendmail: accepti
smmsp 2843 0.0 0.1 8056 1624 ? Ss 08:26 0:00 sendmail: Queue r
root 2854 0.0 0.0 2748 344 ? Ss 08:26 0:00 gpm -m /dev/input
htt 2885 0.0 0.0 1704 128 ? Ss 08:26 0:00 /usr/sbin/htt -re
htt 2886 0.0 0.1 8696 2928 ? S 08:26 0:00 htt_server -nodae
canna 2898 0.0 1.1 18972 17448 ? Ss 08:26 0:00 /usr/sbin/cannase
root 2910 0.0 0.0 5304 912 ? Ss 08:26 0:00 crond
xfs 2945 0.0 0.2 6224 3436 ? Ss 08:26 0:00 xfs -droppriv -da
root 2955 0.0 0.0 2080 484 ? SNs 08:26 0:00 anacron -s
root 2964 0.0 0.0 1928 424 ? Ss 08:26 0:00 /usr/sbin/atd
dbus 2983 0.0 0.0 3936 812 ? Ss 08:26 0:00 dbus-daemon-1 --s
root 2996 0.0 0.0 3600 904 ? Ss 08:26 0:00 cups-config-daemo
root 3007 0.0 0.1 5548 2428 ? Ss 08:26 0:00 hald
root 3094 0.0 0.0 3004 416 tty1 Ss+ 08:26 0:00 /sbin/mingetty tt
root 3137 0.0 0.0 2500 416 tty2 Ss+ 08:26 0:00 /sbin/mingetty tt
root 3184 0.0 0.0 3036 416 tty3 Ss+ 08:26 0:00 /sbin/mingetty tt
root 3230 0.0 0.0 1860 416 tty4 Ss+ 08:26 0:00 /sbin/mingetty tt
root 3268 0.0 0.0 2556 412 tty5 Ss+ 08:26 0:00 /sbin/mingetty tt
root 3309 0.0 0.0 3036 416 tty6 Ss+ 08:26 0:00 /sbin/mingetty tt
root 3349 0.0 0.1 11576 2316 ? Ss 08:26 0:00 /usr/bin/gdm-bina
root 3812 0.0 0.1 12216 2288 ? S 08:26 0:00 /usr/bin/gdm-bina
root 3841 0.0 0.5 11624 8392 ? S 08:26 0:00 /usr/X11R6/bin/X
gdm 3994 0.0 0.8 59384 13724 ? Ss 08:26 0:01 /usr/bin/gdmgreet
root 3995 0.0 0.1 8244 2316 ? Ss 08:27 0:00 sshd: root@notty
root 3997 0.0 0.0 4672 1228 ? Ss 08:27 0:00 /usr/libexec/open
root 4014 0.0 0.1 7400 2500 ? Ss 08:27 0:00 sshd: root@pts/1
root 4016 0.0 0.0 5032 1376 pts/1 Ss 08:27 0:00 -bash
root 4061 0.0 0.1 7988 2320 ? Ss 08:42 0:00 sshd: root@notty
root 4063 0.0 0.0 4636 1220 ? Ss 08:42 0:00 /usr/libexec/open
root 4104 0.0 0.0 3216 764 pts/1 R+ 08:55 0:00 ps -aux是不是mysql没有运行啊!
启动后,看到mysql打开了,紧接着linux死机了...
linux机有时候启动不起来...
我启动mysql后,netstat仍然没有看到有3306端口
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
getnameinfo failed
getnameinfo failed
tcp 0 72 [UNKNOWN]:ssh [UNKNOWN]:1324 ESTABLISHED
getnameinfo failed
getnameinfo failed
tcp 0 0 [UNKNOWN]:ssh [UNKNOWN]:1305 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ] DGRAM 6651 @/var/run/hal/hotplug_socket
unix 11 [ ] DGRAM 5543 /dev/log
unix 2 [ ] DGRAM 3642 @udevd
unix 2 [ ] DGRAM 9268
unix 3 [ ] STREAM CONNECTED 8857
unix 3 [ ] STREAM CONNECTED 8856
unix 3 [ ] STREAM CONNECTED 8855
unix 3 [ ] STREAM CONNECTED 8854
unix 3 [ ] STREAM CONNECTED 8772 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8771
unix 3 [ ] STREAM CONNECTED 8770 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8769
unix 3 [ ] STREAM CONNECTED 8753 /tmp/.font-unix/fs7100
unix 3 [ ] STREAM CONNECTED 8752
unix 3 [ ] STREAM CONNECTED 8757 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8669
unix 2 [ ] DGRAM 7625
unix 3 [ ] STREAM CONNECTED 6650 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 6649
unix 3 [ ] STREAM CONNECTED 6524 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 6523
unix 3 [ ] STREAM CONNECTED 6500
unix 3 [ ] STREAM CONNECTED 6499
unix 2 [ ] DGRAM 6440
unix 2 [ ] DGRAM 6345
unix 2 [ ] DGRAM 6252
unix 2 [ ] DGRAM 6236
unix 2 [ ] DGRAM 6215
unix 2 [ ] DGRAM 6158
unix 3 [ ] STREAM CONNECTED 5728
unix 3 [ ] STREAM CONNECTED 5727
unix 2 [ ] DGRAM 5612
unix 2 [ ] DGRAM 5551
Bad syntax, perhaps a bogus '-'?
root 19721 0.0 0.1 4236 1232 ? S Apr10 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf
mysql 19748 0.0 1.7 123412 18244 ? S Apr10 0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
root 10583 0.0 0.0 2892 464 pts/1 S 21:17 0:00 grep mysqld
[root@xx ~]#[/code]
[root@localhost ~]# Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
l/mysql5.0.45/bin/mysqld_safe --user=root
-bash: Warning:: command not found
[root@localhost ~]# root 4072 0.0 0.0 6008 1068 pts/1 S 06:08 0:00 /bin/sh /usr/local/mysql5.0.45/bin/mysqld_safe --user=root
-bash: root: command not found
[root@localhost ~]# root 4098 0.0 0.8 109060 12524 pts/1 Sl 06:08 0:00 /usr/local/mysql5.0.45/libexec/mysqld --basedir=/usr/local/mysql5.0.45 --datadir=/usr/local/mysql5.0.45/var --user=root --pid-file=/usr/local/mysql5.0.45/var/localhost.localdomain.pid --skip-external-locking --port=3306 --socket=/tmp/mysql.sock
-bash: root: command not found
[root@localhost ~]# root 4189 0.0 0.0 4708 636 pts/1 R+ 06:18 0:00 grep mysqld
鍚姩 MySQL锛?[ 纭畾 ]
[root@localhost ~]# ps -aux | grep mysqld
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
root 4058 0.0 0.0 5616 1228 pts/1 S 06:32 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid
mysql 4086 0.4 1.0 117312 16984 pts/1 Sl 06:32 0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/tmp/mysql.sock
root 4104 0.0 0.0 4412 644 pts/1 S+ 06:33 0:00 grep mysqld
[root@localhost ~]# ps -aux | grep mysqld
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
root 4058 0.0 0.0 5616 1228 pts/1 S 06:32 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid
mysql 4086 0.0 1.1 117336 17168 pts/1 Sl 06:32 0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/tmp/mysql.sock
root 4111 0.0 0.0 4124 636 pts/1 R+ 06:38 0:00 grep mysqld
上面是我启动mysql服务后,输入ps -aux | grep mysqld后按回车出来的结果
netstat -an | grep 3306现在你可以直接 [root@wuxsx008 ~]# mysql -uroot
联接你的mysql 了建议先看一下官方文档中的教程。
MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:669 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.153:3306 192.168.1.179:1092 ESTABLISHED
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::ffff:192.168.1.153:22 ::ffff:192.168.1.179:3335 ESTABLISHED
tcp 0 0 ::ffff:192.168.1.153:22 ::ffff:192.168.1.179:2695 ESTABLISHED
udp 0 0 0.0.0.0:663 0.0.0.0:*
udp 0 0 0.0.0.0:666 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
udp 0 0 0.0.0.0:631 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 6268 /dev/gpmctl
unix 2 [ ] DGRAM 7856 @/var/run/hal/hotplug_socket
unix 2 [ ACC ] STREAM LISTENING 5882 /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 6329 /var/run/.iroha_unix/IROHA
unix 2 [ ACC ] STREAM LISTENING 6331 /var/run/iiim/.iiimp-unix/9010
unix 2 [ ACC ] STREAM LISTENING 6512 /var/run/dbus/system_bus_socket
unix 2 [ ] DGRAM 3640 @udevd
unix 11 [ ] DGRAM 5558 /dev/log
unix 2 [ ACC ] STREAM LISTENING 6439 /tmp/.font-unix/fs7100
unix 2 [ ACC ] STREAM LISTENING 8271 /tmp/.gdm_socket
unix 2 [ ACC ] STREAM LISTENING 8387 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 8764 /tmp/ssh-wulLuA3991/agent.3991
unix 2 [ ACC ] STREAM LISTENING 8866 /tmp/mysql.sock
unix 2 [ ] DGRAM 16202
unix 3 [ ] STREAM CONNECTED 10932 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 10931
unix 3 [ ] STREAM CONNECTED 9139
unix 3 [ ] STREAM CONNECTED 9138
unix 3 [ ] STREAM CONNECTED 9137
unix 3 [ ] STREAM CONNECTED 9136
unix 3 [ ] STREAM CONNECTED 8727 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8726
unix 3 [ ] STREAM CONNECTED 8725 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8724
unix 3 [ ] STREAM CONNECTED 8708 /tmp/.font-unix/fs7100
unix 3 [ ] STREAM CONNECTED 8707
unix 3 [ ] STREAM CONNECTED 8712 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8427
unix 2 [ ] DGRAM 8120
unix 3 [ ] STREAM CONNECTED 7855 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7854
unix 3 [ ] STREAM CONNECTED 6539 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 6538
unix 3 [ ] STREAM CONNECTED 6515
unix 3 [ ] STREAM CONNECTED 6514
unix 2 [ ] DGRAM 6455
unix 2 [ ] DGRAM 6360
unix 2 [ ] DGRAM 6267
unix 2 [ ] DGRAM 6251
unix 2 [ ] DGRAM 6230
unix 2 [ ] DGRAM 6173
unix 3 [ ] STREAM CONNECTED 5743
unix 3 [ ] STREAM CONNECTED 5742
unix 2 [ ] DGRAM 5627
unix 2 [ ] DGRAM 5566