suse required-start: mysql_SUSE Linux中启动Apache和MySQL的方法

默认情况下SUSE Linux中httpd和mysql是没有启动的,

如 直接用mysql命令的话 =〉

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

启动服务的方法如下:

1,桌面操作方式直接用YasT 在 系统-〉服务 里面启动即可

2,命令形式直接启动mysql服务,

命令 方式一:#service [serviceName] [option]

service 可以是apache2,mysql; optition 可以是 start,restart, stop

如:

linux-heng:/srv/www/htdocs # service mysql start

Starting service MySQL                                                     done

linux-heng:/srv/www/htdocs # service apache2 restart

Syntax OK

Shutting down httpd2 (waiting for all children to terminate)         done

Starting httpd2 (prefork)                                            done

linux-heng:/srv/www/htdocs # service apache2 stop

Shutting down httpd2 (waiting for all children to terminate)         done

linux-heng:/srv/www/htdocs # service mysql stop

Shutting down service MySQL                                          done

命令方式二:#rc[service] [optition]

也就是服务名前加 "rc ",如 rcapache2, rcmysql,optiton同命令方式一

如:

linux-heng:/srv/www/htdocs #rcmysql start

Starting service MySQL                                               done

linux-heng:/srv/www/htdocs # rcapache2 start

Apache is already running (/var/run/httpd2.pid)                      done

linux-heng:/srv/www/htdocs # service apache2 restart

Syntax OK

Shutting down httpd2 (waiting for all children to terminate)         done

Starting httpd2 (prefork)                                            done

linux-heng:/srv/www/htdocs # service mysql stop

Shutting down service MySQL                                          done0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值