操作系统:centos
软件列表:httpdtargz mysqltargz phptargz
一.linux下安装mysql
小弟最近搞mysql源码安装安装过程如下:
安装步骤:
groupadd mysql
useradd g mysql mysql
tar zxvf myqltargz
cd mysqltargz
/configure= prefix=/usr/local/mysql
make
make install
cp supportfiles/mymediumcnf /etc/mycnf
cd /usr/local/mysql
bin/mysql_install_db user=mysql
chown R root
chown R mysql var
chgrp R mysql
bin/mysqldsafe user=mysql &
检查日志:more var/localhosterr:
:: mysqld started
:: InnoDB: Started; log sequence number
:: [Note] /usr/local/mysql/libexec/mysqld: ready for connections
Version: log socket: /tmp/mysqlsock port: Source distribution
查看进程:ps aux
root pts/ S : : /bin/sh bin/mysqld_safe user=mysql
mysql pts/ Sl : : /usr/local/myql/libexec/mysqld basedir=/usr/local/myql datadir=/u
root ? SNs : : cupsd
root pts/ R+ : : ps aux
关闭mysql:
bin/mysqladmin shutdown
STOPPING server from pid file /usr/local/myql/var/localhostpid
:: mysqld ended
[]+ Done bin/mysqld_safe user=mysql
[root@localhost myql]# mysql
Welcome to the MySQL monitor Commands end with ; or \g
Your MySQL connection id is to server version: log
Type help; or \h for help Type \c to clear the buffer
如果不行的话killall mysqld在重新启动就OK了
[] []