Æô¶¯ºÍ¹Ø±ÕMySQLµÄ·½·¨
£¨1£©Æô¶¯
MySQL°²×°Íê³ÉºóÆô¶¯ÎļþmysqlÔÚ/etc/init.dĿ¼Ï£¬ÔÚÐèÒªÆô¶¯MySQL·þÎñʱÔËÐÐÏÂÃæÃüÁî¼´¿É¡£ [root@test1 init.d]# /etc/init.d/mysql start
£¨2£©Í£Ö¹
/usr/bin/mysqladmin -u root -p shutdown
£¨3£©ÉèÖÃMySQL×Ô¶¯Æô¶¯
1£©²ì¿´mysqlÊÇ·ñÔÚ×Ô¶¯Æô¶¯ÁбíÖÐ
[root@test1 local]# /sbin/chkconfig --list
2£©°ÑMySQLÌí¼Óµ½ÄãϵͳµÄÆô¶¯·þÎñ×éÀïÃæÈ¥
[root@test1 local]# /sbin/chkconfig --add mysql
3£©°ÑMySQL´ÓÆô¶¯·þÎñ×éÀïÃæɾ³ý¡£
[root@test1 local]# /sbin/chkconfig -- del mysql
Ïà¹ØÎĵµ£º
½ñÌìµ½mysqlÍøÕ¾¿´¿´·¢ÏÖûÓÐÁËsun LOGO£¬Ò²ÕÒ²»µ½mysql downloadsÏÂÔØÁ´½Ó
ÒªÊÖ¹¤´òÈëhttp://dev.mysql.com²ÅÐУ¬²»½ûÉÁ¹ýһ˿Á¹Ò⣬ÒÔÇ°¼á³ÖʹÓÃmysqlÏÖÔÚ»¹Òª¼á³ÖÂð£¬
ÒÔÇ°ÐÄÀïÒ»Ö±ÔÚÏëÒ»Ö±»áʹÓÃmysqlµÄ£¬µ«ÊÇÏÖÔڸоõµ½ºÜʧÍû£¬´ìÕÛ£¬½¹ÂÇ£¬²»ÖªÒÔºó»áÔõôÑù
×Ô¼º¼¸ÄêÀ´Ò»Ö±Ê¹ÓÃLAMP×éºÏ£¬ÖªÊ¶¶¼ÊÇÊÇΧÈÆ×ÅÕâ¸ö×éºÏ ......
Ê×Òª²½Öè(Ò»°ã¿ÉÊ¡ÂÔ):
¿ªÆômysql·þÎñ(ĬÈÏÊÇ¿ª»úʱ¾Í×Ô¶¯ÔËÐÐÁË):
¿ØÖÆÃæ°å
-->¹ÜÀí¹¤¾ß-->·þÎñ,ÔÚÀïÃæÕÒµ½Ãû³ÆΪmysqlµÄÏî,Ë«»÷¾Í¿É¿´ËüµÄ·þÎñ״̬ÊÇÆô¶¯»¹ÊÇÍ£Ö¹,°ÑËüÉèΪÆô¶¯
Á¬½Ómysql:
ÔÚÃüÁîÐÐÏÂÊäÈë mysql -h
localhost -u root -p»Ø³µ,È»ºóÊäÈëÃÜÂë¼´¿É;»òÖ±½ÓÔËÐÐmysql×Ô´øµÄÁ¬½Ó¹¤¾ß,È»ºóÊäÈëÃÜÂë¼ ......
×î½üÁ˽âÁËÒ»ÏÂMYSQL×¢È룬Ҳʵ¼Ê²Ù×÷ÁËһϣ¬È·Êµ·¢ÏÖÁËËûµÄÍþÁ¦¡£
Ò»¸ö×¢È멶´¿ÉÒÔÈÃÈËÖ±½ÓÄõ½·þÎñÆ÷ȨÏÞ¡£
×ܽáһϣº
1£¬Ä¿Â¼µÄȨÏÞ²»ÄÜÌ«¸ß£¬²»È»±ðÈËÄÜÍùÀïдÎļþ£¬ÒÔÇ°ÓÃ0777ÕæÊÇÌ«ÓÞ´ÀÁË¡£
2£¬Ñϸñ¹ýÂËÊý¾Ý£¬ÕûÐÎÒ»ÂÉתint»òÓÃmysql_escape_string
3£¬ÉèÖúÏÀíµÄÊý¾Ý¿âȨÏÞ£¬²»ÒªÓÃROOT,²»È»»áËÀµÃºÜ²Ò¡£
4 ......
MSSQL ÈçºÎʵÏÖ MySQL µÄ limit ²éѯ·½Ê½
²»ÖªÎªºÎ£¬MSSQL ÖÐûÓÐ limit Õâ¸ö¼«ÎªÖØÒªµÄ²éѯ·½Ê½£¬ÊìϤ MySQL µÄÅóÓѶ¼ÖªµÀ£¬MySQL µÄ limit ¶ÔÓÚʵÏÖ·ÖÒ³ºÍһЩÏÞÖƽá¹û¼¯µÄÓ¦ÓÃÖзdz£·½±ã¡£Ã»Óв»Òª½ô£¬ÎÒÃÇ¿ÉÒÔÓÃÆäËû·½·¨´ïµ½Í¬ÑùµÄÄ¿µÄ£¬×Ô¼º¶¯ÊÖ£¬·áÒÂ×ãʳ£¡
Óï·¨£º
Code:
SELECT * from
(
......
£¨1£©¸ñʽ£ºgrant select on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
£¨2£©Àý1¡¢Ôö¼ÓÒ»¸öÓû§user_1ÃÜÂëΪ123£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔrootÓû§Á¬ÈëMySQL£¬È»ºó¼üÈëÒÔÏÂÃüÁ
mysql> grant select,insert,update,delete on *.* to use ......