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

FedoraÏÂMysqlµÄ¼òµ¥Ê¹ÓÃ

תµ½¸½Â¼1£¨mysql ÃüÁî´óÈ« - ÃüÁîÏê½â
£©
תµ½¸½Â¼2£¨mysqlÂÒÂëÎÊÌâ½â¾ö·½·¨
£©
ÔÚÎÒµÄFedoraÖУ¬ÔÚϵͳ°²×°Ê±ÎÒ¾ÍÑ¡Ôñ°²×°ÁËMysqlÁË£¬ËùÒԾͲ»ÓÃÔÙÈ¥ÏÂÔØÔ´´úÂ룬ȻºóÈ¥ÂýÂý±àÒë¡£¹þ¹þ£¬ÍµÁËÒ»¸öÀÁ¡£
ϵͳ°²×°ºÃÁË£¬Mysqlʱ±Ø²»¿ÉÉٵģ¬ËùÒÔÒ»¶¨Òª¼ìÑéÒ»ÏÂMysql¿ÉÒÔÓò»¡£
Ê×ÏÈÇл»µ½rootÕË»§£¬È»ºóÊäÈëÃüÁservice mysqld start
ϵͳÏÔʾÈçÏ£º
³õʼ»¯ MySQL Êý¾Ý¿â£º Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h stony password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!     [È·¶¨]
ÕýÔÚÆô¶¯ mysqld£º                                                                                [È·¶¨]
¿´À´MysqlµÄ·þÎñ¿ÉÒÔÆô¶¯ÆðÀ´£¬Ó¦¸ÃÎÊÌâ²»´óÁË¡£
ÂíÉÏÌí¼ÓrootÃÜÂ룬mysqladmin -u root  password xxxxxx
µÇ¼ÒÔÏ£¬ÊäÈëÃüÁmysql -u root -p
ÇëÇóÊäÈëÃÜÂ룬ÊäÈëÃÜÂ룬½øÈëÁË£¡^_^   
µ½ÕâÀӦ¸Ã»ù±¾ÉÏ¿ÉÒÔ˵MysqlÊÇûÓÐÎÊÌâµÄÁË¡£Ê±¼ä²»ÔçÁË£¬½ñÌìµÄMysql¾ÍŪµ½ÕâÀï¡£Ã÷Ì쿪ʼ


Ïà¹ØÎĵµ£º

mysqlÐÔÄÜÓÅ»¯


¾¡¿ÉÄܵØÊ¹ÓÃ×îÓÐЧ(×îС)µÄÀàÐÍ¡£MySQLÓкܶà½ÚÊ¡´ÅÅ̿ռäºÍÄÚ´æµÄרҵ»¯ÀàÐÍ¡£
Èç¹û¿ÉÄÜʹ±í¸üС£¬Ê¹ÓýÏСµÄÕûÊýÀàÐÍ¡£ÀýÈ磬MEDIUMINT¾­³£±ÈINTºÃһЩ¡£
Èç¹û¿ÉÄÜ£¬ÉùÃ÷ÁÐΪNOT NULL¡£ËüʹÈκÎÊÂÇé¸ü¿ì¶øÇÒÄãΪÿÁнÚʡһλ¡£×¢ÒâÈç¹ûÔÚÄãµÄÓ¦ÓóÌÐòÖÐÄãȷʵÐèÒªNULL£¬ÄãÓ¦¸ÃºÁÎÞÒÉÎÊʹÓÃËü£¬Ö»ÊDZÜÃâȱʡµØÔÚËùÓ ......

MySQL replace into Ó÷¨


ÔÚÏò±íÖвåÈëÊý¾ÝµÄʱºò£¬¾­³£Óöµ½ÕâÑùµÄÇé¿ö£º1. Ê×ÏÈÅжÏÊý¾ÝÊÇ·ñ´æÔÚ£» 2. Èç¹û²»´æÔÚ£¬Ôò²åÈ룻3.Èç¹û´æÔÚ£¬Ôò¸üС£
ÔÚ SQL Server ÖпÉÒÔÕâÑù´¦Àí£º
if not exists (select 1 from t where id = 1) insert into t(id, update_time) values(1, getdate()) else update t set update_time = getdate() where id = ......

Now it's MySQL's turn...

Some problems encounted this afternoon, when trying to setup/test mysql capabilities on hypnos and virgil.
1.ERROR 2003 (HY000): Can't connect to MySQL server on 'server-name' (111)
access locally (i.e. from localhost) is fine, when trying remotely got this error. when tried with mysql++ library, ......

mysql´æ´¢¹ý³Ì Àý×Ó Óαêcursor Ñ­»·Ç¶Ì× ÊÂÎï

×òÌìÒªmysqlÖÐд´æ´¢¹ý³Ì·¢ÏÖÍøÉÏÓйØÓÚcursorÑ­»·ÇÒÌ×µÄ×ÊÁϺÜÉÙ,ÏÖ·¢³ö±¾ÈËдµÄÀý×Ó,Ï£ÍûÄܶԴó¼ÒÓаïÖú.
¿´ÕÐ:
DELIMITER $$
USE `ad_db`$$
DROP PROCEDURE IF EXISTS `test`$$
CREATE DEFINER=`root`@`%` PROCEDURE `test`()
BEGIN
     /** CPAЧ¹ûÊý */
DECLARE _tmpId1 INT; 
DECLARE ......

Ò»¸ö¸´ÔÓµÄmysql²éѯÓï¾ä(case,when,then,left join )

select `a`.`id` AS `id`,`a`.`UserName` AS `UserName`,
(case when (`a`.`sRegDate` = _utf8'1990-01-01 00:00:00.0') then _utf8'' else cast(date_format(`a`.`sRegDate`,_utf8'%Y-%m-%d %H:%i:%S') as char charset utf8) end) AS `sRegDate`,(case when (`a`.`feeendtime` = _utf8'1990-01-01 00:00:00.0') then _ut ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ