Configuring the MySQL Service
[Email protected] ~]# Find/-name mysql.server
/opt/lampp/share/mysql/mysql.server
/opt/lampp/bin/mysql.server # #mysql启动文件
[[email protected] ~]# ln-s/opt/lampp/bin/mysql.server/etc/rc.d/init.d/mysql # #软连接 (understood as shortcut keys)
[Email protected] ~]# Vi/etc/rc.d/init.d/mysql # #大概看了一眼
[Email protected] ~]# chkconfig--add MySQL # #增加mysql的系统服务
[Email protected] ~]# chkconfig--list MySQL # #列出mysql服务的设置情况
MySQL 0: off 1: Off 2: Enable 3: Enable 4: Enable 5: Enable 6: Off
[email protected] ~]# netstat-an|grep:3306
TCP 0 0::: 3306:::* LISTEN
[[email protected] ~]# ps-aux|grep MySQL
Warning:bad syntax, perhaps a bogus '-'? See/usr/share/doc/procps-3.2.8/faq
root 2436 0.0 0.2 3044 1340 pts/0 S 11:46 0:00/bin/sh/opt/lampp/bin/mysqld_safe--datadir=/opt/lam Pp/var/mysql--pid-file=/opt/lampp/var/mysql/centos1.pid
MySQL 2797 0.6 19.0 330620 97348 pts/0 Sl 11:46 0:00/opt/lampp/sbin/mysqld--basedir=/opt/lampp--datadir =/opt/lampp/var/mysql--plugin-dir=/opt/lampp/lib/mysql/plugin/--user=mysql--log-error=/opt/lampp/var/mysql/ Centos1.err--pid-file=/opt/lampp/var/mysql/centos1.pid--socket=/opt/lampp/var/mysql/mysql.sock--port=3306
root 2830 0.0 0.1 5980 756 pts/0 s+ 11:48 0:00 grep mysql
[Email protected] ~]#
Configure Apache Services
[Email protected] ~]# Find/-name apachectl
/opt/lampp/bin/apachectl
[Email protected] ~]# ln-s/opt/lampp/bin/mysql.server/etc/rc.d/init.d/mysql
[Email protected] ~]# vi/etc/rc.d/init.d/mysql # #加入 #chkconfig:2345
[[email protected] ~]# chkconfig--add MySQL
[[email protected] ~]# chkconfig--list MySQL
MySQL 0: off 1: Off 2: Enable 3: Enable 4: Enable 5: Enable 6: Off
[[Email protected] ~]# service MySQL stop
Shutting down MySQL. success!
[[Email protected] ~]# service MySQL start
Starting MySQL. success!
[[email protected] ~]# ps-aux|grep MySQL
Warning:bad syntax, perhaps a bogus '-'? See/usr/share/doc/procps-3.2.8/faq
root 2436 0.0 0.2 3044 1340 pts/0 S 11:46 0:00/bin/sh/opt/lampp/bin/mysqld_safe--datadir=/opt/lam Pp/var/mysql--pid-file=/opt/lampp/var/mysql/centos1.pid
MySQL 2797 0.8 19.0 330620 97348 pts/0 Sl 11:46 0:00/opt/lampp/sbin/mysqld--basedir=/opt/lampp--datadir =/opt/lampp/var/mysql--plugin-dir=/opt/lampp/lib/mysql/plugin/--user=mysql--log-error=/opt/lampp/var/mysql/ Centos1.err--pid-file=/opt/lampp/var/mysql/centos1.pid--socket=/opt/lampp/var/mysql/mysql.sock--port=3306
root 2824 0.0 0.1 5980 756 pts/0 s+ 11:48 0:00 grep mysql
XAMPP after installation, add Apache, MySQL service