操作系統: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了
[] []
From:http://tw.wingwit.com/Article/program/MySQL/201311/29658.html