1£®½« mysql-standard-4.0.24-pc-linux-gnu-i686.tar.gz ¿½±´µ½Ò»¸öĿ¼ÖÐ
2£®shell> tar zvxf
mysql-standard-4.0.24-pc-linux-gnu-i686.tar.gz
3£®ÉÏÃæµÄÃüÁÔÚµ±Ç°Ä¿Â¼ÏÂÉú³ÉÒ»¸ömysql-standard-4.0.24-pc-linux-gnu-i686Îļþ¼Ð
4£®shell>mv mysql-standard-4.0.24-pc-linux-gnu-i686 /usr/local/mysql
5£®ÉÏÃæµÄÃüÁîÊǽ«mysql-standard-4.0.24-pc-linux-gnu-i686ϵÄËùÓ櫶«£¬¼ôÇе½/usr/local/mysql Ï£¬½øÐÐÕâÒ»²½ÊÇΪÁËÒÔºóµÄ·½±ã¡£
6£®shell> groupadd mysql Ôö¼ÓÒ»¸öÃûΪmysqlµÄÓû§×é
7£®shell> useradd -g mysql mysql ÔÚmysqlÓû§×éÖмÓÒ»¸öÃûΪmysqlµÄÓû§Èç¹ûÉÏÃæµÄÁ½¸öÃüÁî²»ÄÜÖ´ÐУ¬ÄÇôҪÇл»µ½rootÓû§ÏÂÖ´ÐÐ
shell>su root -
8£®shell> cd /usr/local/mysql support-files/my-medium.cnf /etc/my.cnf Õâʱ»áÎÊÊÇ·ñ¸²¸ÇÖØÃûÎļþ£¬»Ø´ðy
10.shell> scripts/mysql_install_db --user=mysql
11.shell> chown -R root . ×¢ÒâºóÃæÓе㣬±íʾ½«µ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþÓë×ÓĿ¼µÄÓµÓÐÕßÉ趨ΪrootÓû§
12.shell> chown -R mysql data ±íʾ½«µ±Ç°Ä¿Â¼ÏµÄdataĿ¼µÄÓµÓÐÕßÉ趨ΪmysqlÓû§
13.shell> chgrp -R mysql . ×¢ÒâºóÃæÓе㣬±íʾ½«µ±Ç°Ä¿Â¼ÏµÄÎļþµÄÎļþ×éÉèΪmysql×é
14.shell> bin/mysqld_safe --user=root & ´ËʱÈç¹ûûÓгöÏÖ“……ended”×ÖÑù£¬´ó¹¦¸æ³É£¡
15.»Ø³µÏÔʾshell>
ͨ¹ý shell>netstat –atln ÃüÁî²é¿´3306¶Ë¿ÚÊÇ·ñÒѾÆôÓÃ
Ò²¿ÉÒÔ shell>ps -ef | grep mysqld ²é¿´µ±Ç°ÏµÍ³ÖеÄmysqldµÄ½ø³Ì
»òÖ±½Ó shell>bin/mysql –u root ½øÈëmysql¿Í»§¶Ë£¬½øÐÐmysql²Ù×÷
»òshell>bin/mysqladmin shutdown Í£Ö¹mysql·þÎñ
¼Çס£º
´ËʱÄãµÄrootÓû§ÊÇûÓÐÃÜÂëµÄ£¬ÈκÎÉí·Ý¶¼¿ÉÒÔÓÃroot½øÈ룬Äã¿ÉÒÔͨ¹ýshell> bin /mysqladmin -u root password пÚÁî À´É趨rootÓû§µÄ¿ÚÁ´Ë¿ÚÁÔÚ½øÈëmysql¿Í»§¶ËºÍÍ£Ö¹mysql·þÎñʱÐèÒªÊäÈëÌáʾ£ºÔÚÆôµ¥¸ö·þÎñµÄʱºò£¬¿ÉÒÔͨ¹ýÐÞ¸Ä/etc/my.cnfÎļþÀ´ÅäÖÿÉÒÔÓÃVI±à¼Æ÷´ò¿ªmy.cnf £¬Ôõô´ò¿ª ¿´ÏÂÃæ £º
shell>vi my.cnf
´ò¿ªmy.cnf ÕÒµ½ÏÂÃæÕâ¶Î
[mysqld]
port = 8888
socket = /tmp/mysql.sock
¿ÉÒÔÔÚºóÃæ¼ÓÉÏÏàÓ¦µÄÅäÖÃ
log = /var/log/mysql.log
datadir = /free/mysqldbf
Èç log = /* ¸Ä±älogµÄ±£´æλÖÃ
datadir = /free/mysqldbf ¸Ä±ädataµÄ±£´æλÖÃ