MySQL´î½¨
Ò»¡¢MySQL°²×°£º
Ìí¼ÓϵͳÓû§£º
groupadd mysql (/usr/sbin/groupadd)
useradd -g mysql mysql
°²×°²½Ö裺
tar zxfv mysql-*.tar.gz(mysql-5.0.51a)
./configure --prefix=/usr/local/mysql
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .
Æô¶¯·þÎñÃüÁ
/usr/local/mysql/bin/mysqld_safe &
¶þ¡¢µÇ¼MySQL
µÇ¼MySQLµÄÃüÁîÊÇmysql£¬ mysql µÄʹÓÃÓï·¨ÈçÏ£º
mysql [-u username] [-h host] [-p[password]] [dbname]
username Óë password ·Ö±ðÊÇ MySQL µÄÓû§ÃûÓëÃÜÂ룬mysqlµÄ³õʼ¹ÜÀíÕʺÅÊÇroot£¬Ã»ÓÐÃÜÂ룬עÒ⣺Õâ¸örootÓû§²»ÊÇLinuxµÄϵͳÓû§¡£MySQLĬÈÏÓû§ÊÇroot£¬ÓÉÓÚ³õʼûÓÐÃÜÂ룬µÚÒ»´Î½øʱֻÐè¼üÈëmysql¼´¿É¡£
[root@test1 local]# mysql
Welcome to the MySQL monitor.¡¡Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.16-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
³öÏÖÁË“mysql>”Ìáʾ·û£¬¹§Ï²Ä㣬°²×°³É¹¦£¡
Ôö¼ÓÁËÃÜÂëºóµÄµÇ¼¸ñʽÈçÏ£º
mysql -u root -p
Enter password: (ÊäÈëÃÜÂë)
ÆäÖÐ-uºó¸úµÄÊÇÓû§Ãû£¬-pÒªÇóÊäÈëÃÜÂ룬»Ø³µºóÔÚÊäÈëÃÜÂë´¦ÊäÈëÃÜÂë¡£
×¢Ò⣺Õâ¸ömysqlÎļþÔÚ/usr/binĿ¼Ï£¬ÓëºóÃæ½²µÄÆô¶¯Îļþ/etc/init.d/mysql²»ÊÇÒ»¸öÎļþ¡£
Èý¡¢MySQLµÄ¼¸¸öÖØҪĿ¼
MySQLµÄÊý¾Ý¿âÎļþ¡¢ÅäÖÃÎļþºÍÃüÁîÎļþ·Ö±ðÔÚ²»Í¬µÄĿ¼£¬Á˽âÕâЩĿ¼·Ç³£ÖØÒª£¬ÓÈÆä¶ÔÓÚLinuxµÄ³õѧÕߣ¬ÒòΪ Linux±¾ÉíµÄĿ¼½á¹¹¾Í±È½Ï¸´ÔÓ£¬Èç¹û¸ã²»Çå³þMySQLµÄ°²×°Ä¿Â¼ÄǾÍÎÞ´Ó̸ÆðÉîÈëѧϰ¡£
ÏÂÃæ¾Í½éÉÜÒ»ÏÂÕ⼸¸öĿ¼¡£
1¡¢Êý¾Ý¿âĿ¼
/usr/local/mysql/var
2¡¢ÅäÖÃÎļþ
/usr/local/mysql/share/mysql£¨mysql.serverÃüÁî¼°ÅäÖÃÎļþ£©
3¡¢Ïà¹ØÃüÁî
/usr/local/mysql/bin(mysqladmin mysqldumpµÈÃüÁî)
4¡¢Æô¶¯½Å±¾
/usr/local/mysql/bin£¨Æô¶¯½Å±¾Îļþmysqld_safe£©
ËÄ¡¢Ð޸ĵǼÃÜÂë
MySQLĬÈÏûÓÐÃÜÂ룬°²×°Íê±ÏÔö¼ÓÃÜÂëµÄÖØÒªÐÔÊDz»ÑÔ¶øÓ÷µÄ¡£
1¡¢ÃüÁî
usr/bin/mysqladmin -u root password 'new-password'
¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
2¡¢Àý×Ó
Àý1£º¸øroot¼Ó¸öÃÜÂë123456¡£
¼üÈëÒÔÏÂÃüÁî £º
[root@test1 local]# /usr/bin/
Ïà¹ØÎĵµ£º
°æȨÉùÃ÷
£º×ªÔØʱÇëÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂÔʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷
http://bbayou.blogbus.com/logs/37045617.html
²âÊÔÊý¾Ý2.5G£¬¹²ÓÐÊý¾Ý9427567Ìõ¡£ÓõÄmysqlµÄlarge·þÎñÆ÷µÄÅäÖá£
load
Ò»´ÎÐèÒª´ó¸Å10·ÖÖÓ×óÓÒ¡£
½¨µÄ±íÓõÄÊÇMYISAM£¬µ÷ÕûÁ˼¸¸ösessionµÄ²ÎÊýÖµ
SET
SESSION
BULK_INSERT_BUFFER_S ......
MySQLÓжàÖÖ´æ´¢ÒýÇ棺
MyISAM¡¢InnoDB¡¢MERGE¡¢MEMORY(HEAP)¡¢BDB(BerkeleyDB)¡¢EXAMPLE¡¢FEDERATED¡¢ARCHIVE¡¢CSV¡¢BLACKHOLE¡£
MySQLÖ§³ÖÊý¸ö´æ´¢ÒýÇæ×÷Ϊ¶Ô²»Í¬±íµÄÀàÐ͵Ĵ¦ÀíÆ÷¡£MySQL´æ´¢ÒýÇæ°üÀ¨´¦ÀíÊÂÎñ°²È«±íµÄÒýÇæºÍ´¦Àí·ÇÊÂÎñ°²È«±íµÄÒýÇ棺
¡ô MyISAM¹ÜÀí·ÇÊÂÎñ±í¡£ËüÌṩ¸ßËÙ´æ´¢ºÍ¼ìË÷£¬ÒÔ¼°È«ÎÄËÑË÷ÄÜÁ¦¡ ......
C#Á¬½ÓMySQLÊý¾Ý¿â·½·¨
1¡¢ÓÃMySQLDriverCSÁ¬½ÓMySQLÊý¾Ý¿âÏÈÏÂÔغͰ²×°MySQLDriverCS£¬µØÖ·£º
http://sourceforge.net/projects/mysqldrivercs
ÔÚ°²×°Îļþ¼ÐÏÂÃæÕÒµ½MySQLDriver.dll£¬È»ºó½«MySQLDriver.dllÌí¼ÓÒýÓõ½ÏîÄ¿ÖÐ
×¢£ºÎÒÏÂÔصÄÊÇ°æ±¾ÊÇ MySQLDriverCS-n-EasyQueryTools-4.0.1-DotNet2.0.exe
using System; ......
ÍøÕ¾µÄÊý¾Ý¿âÊǵ÷ÓÃÔ¶³Ì·þÎñÆ÷ÉϵÄ,²»ÊDZ¾»úµÄ.ÍøÕ¾´ò¿ª±È½ÏÂý.ÔÚÍøÉÏËÑË÷ÁË·½·¨,Õâ¸ö·½·¨¿ÉÒÔ½â¾ö,µ«ÊÇÓÐÁíÍâµÄÎÊÌâ³öÏÖ:
-----------------------------------------------------------------------
ÔÚ¾ÖÓòÍøÄÚÁ¬½ÓÆäËû»úÆ÷µÄMYSQL,·¢ÏÖËÙ¶ÈÂýµÄºÜ,²»ÖªµÀʲôÔÒò,×ÜÓм¸ÃëµÄÑÓ³Ù.
ºóÀ´ÔÚÍøÉÏ·¢ÏÖ½â¾ö·½·¨,my.iniÀïÃæÌ ......
MySQL³£ÓÃÃüÁî×ܽá
===MySQL»ù´¡====
mysqlÏÂÔØ: http://www.mysql.com/
mysqld ³£¹æMySQL·þÎñÆ÷
mysqld-opt ÓÅ»¯mysql·þÎñÆ÷,ÌṩһЩ¹¦ÄÜ¿ÉÒÔÍÚ¾ò¸üºÃµÄ¹¦ÄÜ
mysqld-max ÓëmysqldÒ»Ñù,µ«¿ÉÒÔÖ§³Ö¸üÐÂ,¸ü¾ßʵÑéÐÔÖʵŦÄÜ(¸ü²»Îȶ¨)
++°²×°mysql
²Î¼û×Ô´øµÄINSTALL-SOURCEÎļþ
$ ./configure –prefix=/app/m ......