Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

´´½¨mysqlʵÀý

1. ÔÚ/etc/my.cnfÖмÓÈëÒ»ÏÂÄÚÈÝ [mysqld_dev]
socket=/tmp/mysql.sock
port=3307
pid-file=/var/run/mysqld/mysqld_dev.pid
datadir=/var/lib/mysql_dev
log=/var/log/mysqld_dev.log
log-error=/var/log/mysqld_dev.err.log
user=mysql 2. ¸ù¾ÝÒÔÉÏÄÚÈÝ´´½¨Ä¿Â¼ºÍÎļþ mkdir /var/lib/mysqld_dev chown mysql:mysql /var/lib/mysqld_dev ... 3. ±àд/etc/rc.d/init.d/mysqld_dev, »òÕß´Ó/etc/rc.d/init.d/mysqld copy Ò»·Ý£¬È»ºóÐÞ¸ÄÆäÖлñÈ¡²ÎÊýµÄ´úÂë¡£ get_mysql_option mysqld_dev datadir "/var/lib/mysql"
datadir="$result"
get_mysql_option mysqld_dev socket "$datadir/mysql.sock"
socketfile="$result"
get_mysql_option mysqld_dev log-error "/var/log/mysqld.log"
errlogfile="$result"
get_mysql_option mysqld_dev pid-file "/var/run/mysqld/mysqld.pid"
mypidfile="$result"   4. Æô¶¯server servie mysqld_dev start ·¢ÏÖ´íÎó mysqld_safe [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist ÐèÒªÓÃmysql_install_dbÀ´´´½¨ÏµÍ³±í¡£ mysql_install_db --user=mysql --datadir=/var/lib/mysql_dev/ ÔÙ´ÎÖØÆô£¬³É¹¦   5. ÓÃmysql -u root -S /tmp/mysql.sock ¾Í¿ÉÒÔÁ¬½ÓÉÏÕâ¸öinstanceÁË¡£ 6. Èç¹û²»Ïëд-S  /tmp/mysql_dev.sock£¬ ¿ÉÒÔÔÚmy.cnf µÄ[client]ÖмÓÈë´úÂëÉèΪĬÈÏsock [client]
socket= /tmp/mysql_dev.sock
       
 
This article is created by ¿ªÐÄд×÷Íø


Ïà¹ØÎĵµ£º

mysql ÓëOracle º¯Êý¶Ô±È

Oracleº¯ÊýºÍmysqlº¯Êý±È½Ï
1.       OracleÖеÄto_number()ת»»³ÉÊý×Ö£»
Oracle> Select to_number(‘123’) from dual;  -----         123;
           &nbs ......

mysqlÓëOracle updateµÄÇø±ð

update £ºµ¥±íµÄ¸üв»ÓÃ˵ÁË£¬Á½ÕßÒ»Ñù£¬Ö÷Ҫ˵˵¶à±íµÄ¸üÐÂ
   
       Oracle> OracleµÄ¶à±í¸üÐÂÒªÇó±È½ÏÑϸñ£¬ËùÒÔÓеÄʱºò²»ÊǺܺÃд£¬ÎÒÃÇ¿ÉÒÔÊÔÊÔOracleµÄÓαê
               &n ......

MYSQL¹ØÓÚ×Ö·û±àÂë·½ÃæµÄ´æ´¢Ô­Àí

    * mysqlÊ×ÏȽ«Äõ½µÄÊý¾Ýת»»Îªcharacter_set_clientÖ¸¶¨µÄ±àÂë¸ñʽ£¬È»ºóת»»Îª character_set_connectionÖ¸¶¨µÄ¸ñʽ£¬×îºóÔÙ½«Êý¾Ý´æ´¢µ½Êý¾Ý¿â£¬´æ´¢¸ñʽΪcharacter_set_databaseËùÖ¸¶¨µÄ¸ñʽ£»
    * ´ÓÊý¾Ý¿â¶ÁÊý¾Ýʱ£¬½«Êý¾Ý¿â¸ñʽת»»Îªcharacter_set_resultsÖ¸¶¨µÄ¸ñʽ£¬ÔÙ·¢Ë ......

linux mysql ¿ª·¢»·¾³

°²×°mysql
sudo apt-get install mysql-servel-5.0 mysql-client-5.0
ÏÂÔØ°²×°¹ý³ÌÖУ¬»áÌáʾÊäÈërootÃÜÂë
°²×°CÓïÑÔ±à³Ì½Ó¿Ú£º
 sudo apt-get install libmysqlclient15-dev
¸ü¶àapi ²é¿´£ºhttp://dev.mysql.com/doc/refman/5.0/en/c.html
Ïà¹ØmysqlÍ·ÎļþºÍ¿âÎļþ°²×°ÔÚ/usr/include/mysql/ºÍ/usr/lib/mysqlÄ¿ ......

MySQLÊý¾Ý¿â±¸·ÝºÍ»¹Ô­µÄ³£ÓÃÃüÁî


±¸·ÝMySQLÊý¾Ý¿âµÄÃüÁî
mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql
±¸·ÝMySQLÊý¾Ý¿âΪ´øɾ³ý±íµÄ¸ñʽ
±¸·ÝMySQLÊý¾Ý¿âΪ´øɾ³ý±íµÄ¸ñʽ£¬Äܹ»Èøñ¸·Ý¸²¸ÇÒÑÓÐÊý¾Ý¿â¶ø²»ÐèÒªÊÖ¶¯É¾³ýÔ­ÓÐÊý¾Ý¿â¡£
mysqldump -–add-drop-table -uusername -ppassword databasename > bac ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ