MysqlÖд´½¨Óû§ÕÊ»§µÄ·½·¨
1.CREATE USER
CREATE USER user [IDENTIFIED BY [PASSWORD] 'password']
[, user [IDENTIFIED BY [PASSWORD] 'password']] ...
CREATE USERÓÃÓÚ´´½¨ÐµÄMySQLÕË»§¡£ÒªÊ¹ÓÃCREATE USER£¬Äú±ØÐëÓµÓÐmysqlÊý¾Ý¿âµÄÈ«¾ÖCREATE USERȨÏÞ£¬»òÓµÓÐINSERTȨÏÞ¡£¶ÔÓÚÿ¸öÕË»§£¬CREATE USER»áÔÚûÓÐȨÏÞµÄmysql.user±íÖд´½¨Ò»¸öмǼ¡£Èç¹û ÕË»§ÒѾ´æÔÚ£¬Ôò³öÏÖ´íÎó¡£
ʹÓÃ×ÔÑ¡µÄIDENTIFIED BY×Ӿ䣬¿ÉÒÔΪÕË»§¸ø¶¨Ò»¸öÃÜÂë¡£userÖµºÍ ÃÜÂëµÄ¸ø¶¨·½·¨ºÍGRANTÓï¾äÒ»Ñù¡£ÌرðÊÇ£¬ÒªÔÚ´¿Îı¾ÖÐÖ¸¶¨ÃÜÂ룬ÐèºöÂÔPASSWORD¹Ø¼ü´Ê¡£Òª°Ñ ÃÜÂëÖ¸¶¨ÎªÓÉPASSWORD()º¯Êý·µ»ØµÄ»ì±àÖµ£¬Ðè°üº¬¹Ø¼ü×ÖPASSWORD¡£
2.ʹÓÃGRANTÓï¾ä
×îºÃµÄ·½·¨ÊÇʹÓÃGRANTÓï¾ä£¬ÒòΪÕâÑù¸ü¾«È·£¬´íÎóÉÙ¡£´ÓMySQL 3.22.11ÆðÌṩÁËGRANT£»ËüµÄÖ÷ÒªÓÃ;ÊÇÀ´¸øÕÊ»§ÊÚȨµÄ£¬µ«Ò²¿ÉÓÃÀ´½¨Á¢ÐÂÕÊ»§²¢Í¬Ê±ÊÚȨ¡£×¢Ò⣺µ±mysqlÔËÐÐÓÚno_auto_create_userʱҪÌṩн¨Óû§µÄÃÜÂ룬·ñÔò²»ÄÜ´´ÐÂÓû§¡£
ÏÂÃæµÄʾÀý˵Ã÷ÈçºÎʹÓÃMySQL¿Í»§¶Ë³ÌÐòÀ´ÉèÖÃÐÂÓû§¡£
Ê×ÏÈ£¬Ê¹ÓÃMySQL³ÌÐòÒÔMySQL rootÓû§À´Á¬½Ó·þÎñÆ÷£º
shell> MySQL --user=root MySQL
Èç¹ûÄãΪrootÕË»§Ö¸¶¨ÁËÃÜÂ룬»¹ÐèҪΪ¸ÃMySQLÃüÁîºÍ±¾½ÚÖеÄÆäËüÃüÁîÌṩ--password»ò-pÑ¡Ïî¡£
ÒÔrootÁ¬½Óµ½·þÎñÆ÷ÉϺ󣬿ÉÒÔÌí¼ÓÐÂÕË»§¡£ÏÂÃæµÄÓï¾äʹÓÃGRANTÀ´ÉèÖÃËĸöÐÂÕË»§£º
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
mysql> GRANT USAGE ON *.* TO 'dummy'@'localhost';
ÓÃGRANTÓï¾ä´´½¨µÄÕË»§ÓÐÏÂÃæµÄÊôÐÔ£º
· ÆäÖÐÁ½¸öÕË»§ÓÐÏàͬµÄÓû§ÃûmontyºÍÃÜÂësome_pass¡£Á½¸öÕË»§¾ùΪ³¬¼¶Óû§ÕË»§£¬¾ßÓÐÍêÈ«µÄȨÏÞ¿ÉÒÔ×öÈκÎÊÂÇé¡£Ò»¸öÕË»§ ('monty'@'localhost')Ö»ÓÃÓÚ´Ó±¾»úÁ¬½Óʱ¡£ÁíÒ»¸öÕË»§('monty'@'%')¿ÉÓÃÓÚ´ÓÆäËüÖ÷»úÁ¬½Ó¡£Çë×¢ÒâmontyµÄÁ½¸öÕË»§±ØÐëÄÜ´ÓÈκÎÖ÷»úÒÔmontyÁ¬½Ó¡£Ã»ÓÐlocalhostÕË»§£¬µ±monty´Ó±¾»úÁ¬½Óʱ£¬mysql_install_db´´½¨µÄlocalhostµÄÄäÃûÓû§ÕË»§½«Õ¼ÏÈ¡£½á¹ûÊÇ£¬monty½«±»
Ïà¹ØÎĵµ£º
Ê×ÏÈ¿´¿´ jspÎļþ java³ÌÐòÀïÓÐûÓÐrequest.setCharacterEncoding("UTF-8");
×Ö·û±àÂëÎÊÌ⣬Êý¾Ý²åÈë¿âÖÐʱ£¬java±àÂëºÍÊý¾Ý¿â±àÂë²»Ò»Ö£¬µ¼Ö²åÈëÊý¾Ý¿âΪÂÒÂ룬¿´µ½Îª£¿£¿£¿£¿µÄÐÎʽ
½«ÄãµÄjspÒ³Ãæ±àÂë¸ÄΪGBK£¬Êý¾Ý¿â¶ÔÓ¦±íµÄ±àÂëÒ²¸ÄΪGBK
±àÂëÒ»Ö£¬¾Í²»»á³öÏÖÂÒÂëÎÊÌâÁ ......
MySQLÖг£ÓõÄÐ޸ıíµÄÃüÁî
¹Ø¼ü×Ö: mysql, Ð޸ıí, ÃüÁî
ÔÚÊý¾Ý¿â²Ù×÷ÖÐ,¸öÈ˾õµÃʹÓõÃ×î¶àµÄ¾ÍÊDzéѯ,È»ºó¾ÍÊǶԱíµÄÐ޸IJÙ×÷ÁË,ÓÈÆäÊǵ±Êý¾Ý¿âµÄÉè¼Æ¹¤×÷ûÓÐ×öºÃʱ.ÏÂÃæ¾ÍMySQLÖÐһЩ³£ÓõÄÐ޸ıíµÄ²Ù×÷½øÐÐ×ܽá:
ΪÁË·½±ãºóÃæµÄ˵Ã÷,ÏÈ´´½¨Ò»¸ö±í,´´½¨Óï¾äÈçÏÂ:
Create ......
BIND-DLZʵÑé:http://bind-dlz.sourceforge.net/
ʵÑé»·¾³:RHEL4,BIND-9.5.0-P2.tar.gz(9.4.0ÒÔÉÏ°æ±¾¶¼ÒѺ¬DLZ²¹¶¡),Mysql-5.0.56.tar.gz
1¡¢°²×°mysql(ÏÈ°²×°gccµÈÏà¹ØÈí¼þ°ü)
#tar zxvf mysql-5.0.56.tar.gz
#cd mysql-5.0.56
#./configure --prefix=/usr/local/my ......
import java.sql.*;
/*
* JAVAÁ¬½ÓACCESS£¬SQL Server,MySQL,OracleÊý¾Ý¿â
*
* */
public class JDBC {
public static void main(String[] args)throws Exception {
Connection conn=null;
//====Á¬½ÓACCESSÊý¾Ý¿â ......