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

Mysql³£ÓÃÃüÁî½Å±¾

Mysql³£ÓÃÃüÁî½Å±¾
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÊÇ mysql -hÖ÷»ú -uÓû§Ãû -pÃØÃÜ
Àý×ÓÊÇ mysql -hlocalhost -uroot -p123456
Ҫȷ¶¨mysql°²×°Ê±ºò¹´Ñ¡ÁË¿ÉÒÔÔ¶³ÌÁ´½Ó¡£Èç¹ûµÇ½±¾µØ¼ÆËã»ú£¬-h¿ÉÒÔÊ¡ÂÔ£¬¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë123456£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË¡£
µÚÈýÕС¢Ôö¼ÓÐÂÓû§
Óï·¨ÊÇ grant ȨÏÞ on Êý¾Ý¿â.±í to Óû§Ãû@µÇ¼Ö÷»ú identified by “ÃÜÂë”
Àý×ÓÊÇ
ËùÓÐȨÏÞ grant all privalleges on zf.* to guqin@localhost identified by “123456″
selectȨÏÞ grant all select on zf.* to guqin@localhost identified by “123456″
µÚËÄÕС¢²Ù×÷Êý¾Ý¿â
µÇ¼µ½mysqlÖУ¬È»ºóÔÚmysqlµÄÌáʾ·ûÏÂÔËÐÐÏÂÁÐÃüÁÿ¸öÃüÁîÒԷֺŽáÊø¡£
1¡¢ ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
2¡¢ ÏÔʾ¿âÖеÄÊý¾Ý±í¡£
use mysql;
show tables;
3¡¢ ÏÔʾÊý¾Ý±íµÄ½á¹¹¡£
desc ±íÃ÷;
4¡¢ ½¨¿âÓëɾ¿â
create database ¿âÃû;
drop database ¿âÃû;
5¡¢ ½¨±íºÍɾ±í¡£
use ¿âÃû;
create table ±íÃû(×Ö¶ÎÁбí);
drop table ±íÃû;
6¡¢ Çå¿Õ±íÖмǼ¡£
delete from ±íÃû;
7¡¢ ÏÔʾ±íÖеļǼ¡£
select * from ±íÃû;
µÚÎåÕС¢µ¼³öºÍµ¼ÈëÊý¾Ý
1. µ¼³öÊý¾Ý¡£
Óï·¨ÊÇ mysqldump –opt ¿âÃû.±íÃû > c:\data.sql
Àý×ÓÊÇ mysqldump -hlocalhost -uroot -p123456 zf.user>c:\data.sql
2. µ¼ÈëÊý¾Ý:
Óï·¨ÊÇ mysqldump –opt ¿âÃû < c:\data.sql
Àý×ÓÊÇ mysqldump -hlocalhost -uroot -p123456 zf<c:\data.sql
»òÕß
mysqlimport -hlocalhost -u root -p123456 < c:\data.sql
3. ½«Îı¾Êý¾Ýµ¼ÈëÊý¾Ý¿â:
use ¿âÃû;
load data local infile “ÎļþÃû” into table ±íÃû;
µÚÁùÕÐ ´´½¨Ò»¸öÊý¾Ý¿â±í
CREATE TABLE MYTABLE (name VARCHAR(20), sex CHAR(1));
µÚÆßÕÐ Íù±íÖмÓÈë¼Ç¼
insert into ±íÃû values (”1″,”2″);
µÚ°ËÕÐ ÓÃÎı¾·½Ê½½«Êý¾Ý×°ÈëÊý¾Ý¿â±íÖÐ
LOAD DATA LOCAL INFILE “c:/data.sql” INTO TABLE ±íÃû;
µÚ¾ÅÕÐ µ¼Èë.sqlÎļþÃüÁÀýÈçc:/data.sql£©
use database;
source c:/data.sql
µÚÊ®ÕÐ ¸üбíÖÐÊý¾Ý
update MYTABLE set sex=”f” where name=’hyq’;
µÚʮһÕÐ ÐÞ¸´±í
repair ±íÃû


Ïà¹ØÎĵµ£º

Mysql½ø»¯ÂÛ1

1.Ëü¿ÉÒÔ±»·ÖΪÈýÀࣺÊý×ÖÀàÐÍÈÕÆÚÀàºÍʱ¼äÀàÐÍ£¬×Ö·û´®ÀàÐÍ¡£
ÁÐÀàÐÍÓÃÓÚÃèÊö:
M£ºÖ¸³ö×î´óµÄÏÔʾ³ß´ç¡£×î´óµÄºÏ·¨ÏÔʾ³ß´çΪ255.
D£ºÊÊÓÃÓÚ¸¡µãÀàÐͲ¢Ö®³õ¸úËæÔÚÊ®½øÖÆСÊýµãºóµÄÊýÂëµÄÊýÁ¿¡£×î´óµÄ¿ÉÄÜÖµÊÇ30£¬µ«ÊDz»Ó¦´óÓÚM.
2.·½À¨ºÅ("[","]")Ö¸³ö¿ÉÑ¡µÄÀàÐÍÐÞÊηûµÄ²¿·Ö£®
£ªÈôÖ¸¶¨ÁËÁÐÀàÐÍΪZEROFILL,MYSQL½«¸Ã ......

CentOSÏÂMySQLÊý¾Ý¿â·þÎñÆ÷µÄ¹¹½¨·½·¨

 ÕâÀ½éÉÜÒ»ÏÂCentOSÏÂMySQLÊý¾Ý¿â·þÎñÆ÷µÄ¹¹½¨·½·¨¡£

°²×°MySQL¼°Ïà¹Ø×é¼þ
¡¡¡¡Ê×ÏÈ£¬°²×°MySQL¡£
[root@sample ~]#
yum
-y install mysql-server
¡¡ ← °²×°MySQL
Setting up Install Process
Setting up repositories
dag 100% |=========================| 1.1 kB 00:00
update ......

ʹÓà MySQL Workbench ¿ÉÊÓ»¯µÄÉè¼Æ MySQL Êý¾Ý¿â

MySQL Workbench ÊÇ MySQL ×î½üÊͷŵĿÉÊÓÊý¾Ý¿âÉè¼Æ¹¤¾ß¡£Õâ¸ö¹¤¾ßÊÇÉè¼Æ MySQL Êý¾Ý¿âµÄרÓù¤¾ß¡£
ÄãÔÚ MySQL Workbench Öн¨Á¢µÄ±»³Æ֮ΪÎïÀíÊý¾ÝÄ£ÐÍ¡£Ò»¸öÎïÀíÊý¾ÝÄ£ÐÍÊÇÕë¶ÔÒ»¸öÌض¨ RDBMS ²úÆ·µÄÊý¾ÝÄ£ÐÍ£»±¾ÎÄÖеÄÄ£Ðͽ«¾ßÓÐһЩ MySQL µÄ¶ÀÌع淶¡£ÎÒÃÇ¿ÉÒÔʹÓÃËüÉú³É£¨forward-engineer£©Êý¾Ý¿â¶ÔÏ󣬳ýÁË°üº¬± ......

mysql Êý¾Ý´æ´¢×ܽá

ÓÉÓÚ×î½üÒ»Ö±ÔÚÁ˽âmysql¡£¸÷ÖÖ±íÀàÐ͵ÄÊý¾Ý´æ´¢ÒÔ¼°Ïà¹ØÏÞÖƾÍÊDZØÐëÁ˽âµÄ·½ÃæÁË¡£
×Ô¼ºµÄ·þÎñÆ÷»·¾³£ºOS Cent OS ext3£¬memory 4G£¬ disk 2T block size 4K¡£
¾­µ÷²é£¬linuxÏÂÎļþ×î´óÊÇ´æÔÚÏÞÖƵġ£È¥googleÉÏËÑÁËËÑ£¬´ó¼Ò˵·¨²»Ò»£¬×îÖÕ×Ô¼º»¹ÊÇÕÒµ½±È½Ï¹Ù·½µÄ˵¡£Ïê¼ûhttp://en.wikipedia.org/wiki/Ext3 ËùÒÔ× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ