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

MySQLн¨Óû§,ÊÚȨ,ɾ³ýÓû§,ÐÞ¸ÄÃÜÂë²Ù×÷

Ê×ÏÈÒªÉùÃ÷һϣºÒ»°ãÇé¿öÏ£¬ÐÞ¸ÄMySQLÃÜÂ룬ÊÚȨ£¬ÊÇÐèÒªÓÐmysqlÀïµÄrootȨÏ޵ġ£
×¢£º±¾²Ù×÷ÊÇÔÚWINÃüÁîÌáʾ·ûÏ£¬phpMyAdminͬÑùÊÊÓá£
    Óû§£ºphplamp  Óû§Êý¾Ý¿â£ºphplampDB
1.н¨Óû§¡£
//怬MYSQL
@>mysql -u root -p
@>ÃÜÂë
//´´½¨Óû§
mysql> insert into mysql.user(Host,User,Password)
values("localhost","phplamp",password("1234"));
//Ë¢ÐÂϵͳȨÏÞ±í
mysql>flush privileges;
ÕâÑù¾Í´´½¨ÁËÒ»¸öÃûΪ£ºphplamp  ÃÜÂëΪ£º1234  µÄÓû§¡£
È»ºóµÇ¼һÏ¡£
mysql>exit;
@>mysql -u phplamp -p
@>ÊäÈëÃÜÂë
mysql>µÇ¼³É¹¦
2.ΪÓû§ÊÚȨ¡£
//µÇ¼MYSQL£¨ÓÐROOTȨÏÞ£©¡£ÎÒÀïÎÒÒÔROOTÉí·ÝµÇ¼.
@>mysql -u root -p
@>ÃÜÂë
//Ê×ÏÈΪÓû§´´½¨Ò»¸öÊý¾Ý¿â(phplampDB)
mysql>create database phplampDB;
//ÊÚȨphplampÓû§ÓµÓÐphplampÊý¾Ý¿âµÄËùÓÐȨÏÞ¡£
>grant all privileges on phplampDB.* to phplamp@localhost identified
by '1234';
//Ë¢ÐÂϵͳȨÏÞ±í
mysql>flush privileges;
mysql>ÆäËü²Ù×÷
/*
Èç¹ûÏëÖ¸¶¨²¿·ÖȨÏÞ¸øÒ»Óû§£¬¿ÉÒÔÕâÑùÀ´Ð´:
mysql>grant select,update on phplampDB.* to phplamp@localhost
identified by '1234';
//Ë¢ÐÂϵͳȨÏÞ±í¡£
mysql>flush privileges;
*/
3.ɾ³ýÓû§¡£
@>mysql -u root -p
@>ÃÜÂë
mysql>DELETE from user WHERE User="phplamp" and Host="localhost";
mysql>flush privileges;
//ɾ³ýÓû§µÄÊý¾Ý¿â
mysql>drop database phplampDB;
4.ÐÞ¸ÄÖ¸¶¨Óû§ÃÜÂë¡£
@>mysql -u root -p
@>ÃÜÂë
mysql>update mysql.user set password=password('ÐÂÃÜÂë') where
User="phplamp" and Host="localhost";
mysql>flush privileges;

  BY:dx_andy


Ïà¹ØÎĵµ£º

mysqlÊý¾Ý¿âlimit²éѯÓÅ»¯

mysqlÊý¾Ý¿âlimit²éѯÓÅ»¯
 
MYSQLµÄÓÅ»¯ÊǷdz£ÖØÒªµÄ¡£ÆäËû×î³£ÓÃÒ²×îÐèÒªÓÅ»¯µÄ¾ÍÊÇlimit¡£mysqlµÄlimit¸ø·ÖÒ³´øÀ´Á˼«´óµÄ·½±ã£¬µ«Êý¾ÝÁ¿Ò»´óµÄʱºò£¬limitµÄÐÔÄܾͼ±¾çϽµ¡£
ͬÑùÊÇÈ¡10ÌõÊý¾Ý
select * from yanxue8_visit limit 10000,10 ºÍ
select * from yanxue8_visit limit 0,10
¾Í²»ÊÇÒ»¸öÊýÁ¿¼¶±ðµ ......

ÓÅ»¯MySQLÊý¾Ý¿â²éѯ

ÓÅ»¯MySQLÊý¾Ý¿â²éѯ
 
   ÔÚÓÅ»¯²éѯÖУ¬Êý¾Ý¿âÓ¦ÓÃ(ÈçMySQL)¼´Òâζ×ŶԹ¤¾ßµÄ²Ù×÷ÓëʹÓá£Ê¹ÓÃË÷Òý¡¢Ê¹ÓÃEXPLAIN·ÖÎö²éѯÒÔ¼°µ÷ÕûMySQLµÄÄÚ²¿ÅäÖÿɴﵽÓÅ»¯²éѯµÄÄ¿µÄ
¡¡¡¡ÈκÎһλÊý¾Ý¿â³ÌÐòÔ±¶¼»áÓÐÕâÑùµÄÌå»á£º¸ßͨÐÅÁ¿µÄÊý¾Ý¿âÇý¶¯³ÌÐòÖУ¬Ò»ÌõÔã¸âµÄSQL²éѯÓï¾ä¿É¶ÔÕû¸öÓ¦ÓóÌÐòµÄÔËÐвúÉúÑÏÖØµÄ ......

MySQLÊý¾Ý¿ârootȨÏÞ¶ªÊ§½â¾ö·½°¸

MySQLÊý¾Ý¿ârootȨÏÞ¶ªÊ§½â¾ö·½°¸
Ò»Ì첻СÐÄ°ÑROOTµÄȨÏ޸ĵ½×îСÁË(Ö»ÄܵǼ,ʲô¶¼×ö²»ÁË),Õâ¿É¼±ËÀÎÒÁË.ÖØ×°µÄ»°Ì«Âé·³£¬¶øÇÒÀïÃæÓкܶàµÄÓû§£¬Ò»¸ö¸öÖØÐÂŪ²»ÖªµÀµ½Ê²Ã´Ê±ºò¡£
ºóÀ´ÎÒÏëÁËÒ»¸ö°ì·¨£¬ÏȰѵ±Ç°·þÎñÆ÷µÄMySQL·þÎñÍ£Ö¹£¬°ÑMySQL DATaĿ¼ÏµÄmysqlĿ¼¸ÄÃûΪmysql_OLD,µ½ÁíÒ»¸ö·þÎñÆ÷Ï°ÑmysqlĿ¼ÏµÄ/ ......

JAVAµ÷ÓÃMYSQL´æ´¢¹ý³Ì

JAVAµ÷ÓÃMYSQL´æ´¢¹ý³Ì
¹¤³ÌÊÓͼ£º
´úÂëÇåµ¥£º
myconn.java
package org.apache.sh_mysql.test;
import java.sql.*;
public class MyConn {

private static final String DRIVER = "com.mysql.jdbc.Driver";
private static final String URL = "jdbc:mysql://localhost/test?useUnicode=true&characterEn ......

mysqlÖ÷´ÓÊý¾Ý¿â²Ù×÷

Ö÷£º
show master status;
+-----------------+------------+-------------------+-----------------------+
| File                |
Position     | Binlog_Do_DB   | Binlog_Ignore_DB |
+------------ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ