mysql »ù±¾ÃüÁî
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö²ÎÊý-h»úÆ÷IP
µÚÈýÕС¢Ôö¼ÓÐÂÓû§
¸ñʽ£ºgrant ȨÏÞ on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
È磬Ôö¼ÓÒ»¸öÓû§user1ÃÜÂëΪpassword1£¬ÈÃÆä¿ÉÒÔÔÚ±¾»úÉϵǼ£¬ ²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔrootÓû§Á¬Èëmysql£¬È»ºó¼üÈëÒÔÏÂÃüÁ
grant select,insert,update,delete on *.* to user1@localhost Identified by "password1";
Èç¹ûÏ£Íû¸ÃÓû§Äܹ»ÔÚÈκλúÆ÷Éϵǽmysql£¬Ôò½«localhost¸ÄΪ"%"¡£
Èç¹ûÄã²»Ïëuser1ÓÐÃÜÂ룬¿ÉÒÔÔÙ´òÒ»¸öÃüÁÃÜÂëÈ¥µô¡£
grant select,insert,update,delete on mydb.* to user1@localhost identified by "";
µÚËÄÕУº ²Ù×÷Êý¾Ý¿â
µÇ¼µ½mysqlÖУ¬È»ºóÔÚmysqlµÄÌáʾ·ûÏÂÔËÐÐÏÂÁÐÃüÁÿ¸öÃüÁîÒԷֺŽáÊø¡£
1¡¢ ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
ȱʡÓÐÁ½¸öÊý¾Ý¿â£ºmysqlºÍtest¡£ mysql¿â´æ·Å×ÅmysqlµÄϵͳºÍÓû§È¨ÏÞÐÅÏ¢£¬ÎÒÃǸÄÃÜÂëºÍÐÂÔöÓû§£¬Êµ¼ÊÉϾÍÊǶÔÕâ¸ö¿â½øÐвÙ×÷¡£
2¡¢ ÏÔʾ¿âÖеÄÊý¾Ý±í£º
use mysql;
show tables;
3¡¢ ÏÔʾÊý¾Ý±íµÄ½á¹¹£º
describe ±íÃû;
4¡¢ ½¨¿âÓëɾ¿â£º
create database ¿âÃû;
drop database ¿âÃû;
5¡¢ ½¨±í£º
use ¿âÃû;
create table ±íÃû(×Ö¶ÎÁбí);
drop table ±íÃû;
6¡¢ Çå¿Õ±íÖмǼ£º
delete from ±íÃû;
7¡¢ ÏÔʾ±íÖеļǼ£º
select * from ±íÃû;
µÚÎåÕС¢µ¼³öºÍµ¼ÈëÊý¾Ý
1. µ¼³öÊý¾Ý£º
mysqldump --opt test > mysql.test
¼´½«Êý¾Ý¿âtestÊý¾Ý¿âµ¼³öµ½mysql.testÎļþ£¬ºóÕßÊÇÒ»¸öÎı¾Îļþ
È磺mysqldump -u root -p123456 --databases dbname > mysql.dbname
¾ÍÊÇ°ÑÊý¾Ý¿âdbnameµ¼³öµ½Îļþmysql.dbnameÖС£
2. µ¼ÈëÊý¾Ý:
mysqlimport -u root -p123456 < mysql.dbname¡£
²»ÓýâÊÍÁË°É¡£
3. ½«Îı¾Êý¾Ýµ¼ÈëÊý¾Ý¿â:
Îı¾Êý¾ÝµÄ×Ö¶ÎÊý¾ÝÖ®¼äÓÃtab¼ü¸ô¿ª¡£
use test;
load data local infile "ÎļþÃû" into table ±íÃû;
1:ʹÓÃSHOWÓï¾äÕÒ³öÔÚ·þÎñÆ÷Éϵ±Ç°´æÔÚʲôÊý¾Ý¿â£º
mysql> SHOW DATABASES;
2:2¡¢´´½¨Ò»¸öÊý¾Ý¿âMYS
Ïà¹ØÎĵµ£º
ÅäÖÃMySQLÖ÷´Ó¸´ÖÆ(Replication)
±êÇ©£ºÖªÊ¶/̽Ë÷ mysql¸´ÖÆ replication mysql±¸·Ý
·ÖÀࣺÊý¾Ý¿â
MySQLÖ§³Öµ¥Ïò¡¢Òì²½¸´ÖÆ£¬¸´Öƹý³ÌÖÐÒ»¸ö·þÎñÆ÷³äµ±Ö÷·þÎñÆ÷£¬¶øÒ»¸ö»ò¶à¸öÆäËü·þÎñÆ÷³äµ±´Ó·þÎñÆ÷¡£Ö÷·þÎñÆ÷½«¸üÐÂдÈë¶þ½øÖÆÈÕÖ¾Îļþ£¬²¢Î¬»¤ÈÕÖ¾ÎļþµÄÒ»¸öË÷ÒýÒÔ¸ú×ÙÈÕ־ѻ·¡£µ±Ò»¸ö´Ó·þÎñ ......
±¾ÎÄÀ´×Ô: ITÔËάר¼ÒÍø ×÷Õß: NetSeek ÈÕÆÚ: 2009-3-8 19:52 ÔĶÁ: 742 ÈË ´òÓ¡ ÊÕ²Ø DNS, Bind, DLZ, ÖÇÄÜ, MySQL ×÷Õß:NetSeek http://www.linuxtone.org
ÈÕÆÚ:2009-3-7 gmail:cnseek@gmail.com
ÍƼöÏÂÔØPDF°æ£¨·½±ã²éÔÄ):http://www.linuxtone.org/project/cdn/bind-dlz-view.pdf
¡¾Ìâ ¸Ù¡ ......
Real example:
/*************************by garcon1986*********************************************************/
<?php
// get the values from entreprise creation form
$secteur = $_POST['secteur'];
$nom = $_POST['nom_entreprise'];
$taille = $_POST['taille_entreprise'];
$concurrent = $_POST[' ......
Twitter¹«Ë¾Ò»Î»Ãû½ÐRyan KingµÄ¹¤³ÌʦÈÕÇ°Ïò²©¿ÍMyNoSQL͸¶£¬¹«Ë¾¼Æ»®´ÓMySQLǨÒƵ½CassandraÊý¾Ý¿â£¬ÒòΪºóÕß¾ßÓиü´óµÄµ¯ÐÔ¡¢¿ÉÀ©Õ¹ÐԺʹóÁ¿µÄÉçÇøÍøÂ翪Դ¿ª·¢ÈËÔ±¡£
ÎÒÃÇÓдóÁ¿µÄÊý¾Ý£¬ÔÚÊý¾Ý¾Þ´ó£¬Ôö³¤ÂÊÕýÔÚ¼ÓËÙµÄÇé¿öÏ£¬ÎÒÃÇÐèÒªÒ»¸öϵͳ£¬Ëü¿ÉÒÔ¸üΪ×Ô¶¯»¯£¬²¢¸ß¶È¿É¿¿¡¢¿ÉÓá£Ryan K ......