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/
Ïà¹ØÎĵµ£º
ÔÚZend FrameWorkÖе÷ÓÃmysqlµÄ´æ´¢¹ý³Ì·½·¨ÈçÏ£º
$db = Zend_Db::factory($sql_DbType,$sql_Config);
$connection=$db->getConnection();
Zend_Registry::set("db",$db);
Zend_Registry::set("connect",$connection);
µ÷Óô洢¹ý³ÌÈçÏ´úÂëËùʾ£º
$this->_db = Zend_Registry::get('db');
$connection=Zend_ ......
Æô¶¯mysqlµÄ·þÎñ¾³£·¢ÏÖ1067Õâ¸ö´íÎ󡣲鿴ʼþÈÕÖ¾ÒÔºó·¢ÏÖÏÂÃæµÄ´íÎóÐÅÏ¢
Unknown/unsupported table type: INNODB
ÈçºÎ½â¾ö£ºÔÚmysqlÊý¾Ý´æ·ÅĿ¼ÏÂÕÒµ½ ibdata ÒÔ¼°ib_logfile0¡¢ib_logfile1ɾµôÔÙÆô¶¯¾ÍºÃÁË ......
MySQLÓжàÖÖ´æ´¢ÒýÇ棺
MyISAM¡¢InnoDB¡¢MERGE¡¢MEMORY(HEAP)¡¢BDB(BerkeleyDB)¡¢EXAMPLE¡¢FEDERATED¡¢ARCHIVE¡¢CSV¡¢BLACKHOLE¡£
MySQLÖ§³ÖÊý¸ö´æ´¢ÒýÇæ×÷Ϊ¶Ô²»Í¬±íµÄÀàÐ͵Ĵ¦ÀíÆ÷¡£MySQL´æ´¢ÒýÇæ°üÀ¨´¦ÀíÊÂÎñ°²È«±íµÄÒýÇæºÍ´¦Àí·ÇÊÂÎñ°²È«±íµÄÒýÇ棺
¡ô MyISAM¹ÜÀí·ÇÊÂÎñ±í¡£ËüÌṩ¸ßËÙ´æ´¢ºÍ¼ìË÷£¬ÒÔ¼°È«ÎÄËÑË÷ÄÜÁ¦¡ ......
×î½üÒ»Ö±ÔÚÑо¿freeBSDÏÂnginx+php+mysqlµÄ°²×°£¬¿´Á˺ܶàÍøÉϵÄ×ÊÁÏÊÕ»ñ²»Ð¡£¬²»¹ý´ó²¿·Ö¶¼ÊDZàÒë°²×°£¬Ïà¶Ô³õѧÕßÀ´Ëµ±È½Ï¸´ÔÓ£¬²»ÈÝÒ×Àí½â£¬ËùÒÔÎÒÕûºÏÁËһЩports°²×°µÄ×ÊÁÏ£¬¶¼ÊǾ¹ý×Ô¼ºÑéÖ¤ºóµÄ£¬°²×°³É¹¦Ò²±È½ÏÈÝÒ×Àí½â£¬ÏÂÃæÊÇÁ½Öֳɹ¦µÄ°¸Àý£¬ÆäÖÐÓÐÒ»¸öÊÇApache´úÌænginxµÄ°²×°£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
° ......