MysqlÏà¹Ø
1¡¢°²×°Ä¿Â¼:
½«my.iniÖÐ:
datadirµÄÖµ¸ü¸ÄΪ£º"sql/data/"
basedirµÄÖµ¸ü¸ÄΪ£º"sql"
2¡¢½øÈësql/data/"£¬É¾³ýÎļþ¼ÐÍâµÄËùÓÐÎļþ¡£
net start mysql»Ø³µ……
×¢ÒâбÏß/
ÐÞ¸Äpswd
·½·¨1£ºmysqladmin -u root -p "old password" "new password" (´ËÃüÁîÎÞ·¨°ÑÃØÃÜÇå¿Õ)
·½·¨2£ºÖ±½Ó½øÈëmysqlÊý¾Ý¿â£¬ÐÞ¸Äuser±íÖеÃÃÜÂë(¼ÓÃÜÃÜÂ룬ֱÊʺÏÇå¿Õ)¡£
mysql -u root -p (´ËÃüÁî¿É½øÈëmysqlÐèÊäÈëÃÜÂë)
“SET PASSWORD FOR root@localhost = OLD_PASSWORD('passwd');”
Ïà¹ØÎĵµ£º
µ¼³ö
select field1,field2,field3 from tablename into outfile '/home/output1.csv' fields terminated by ','optionally enclosed by ''lines terminated by '\n';
µ¼Èë
load data local infile '/home/output1.csv' into table tablename fields terminated by ','lines terminated by '\n'(field1,f ......
ÅäÖø´ÖÆ
1.ÅäÖÃserver-idºÍlog-bin
2.Ö÷¿âÖÐÌí¼ÓÓÃÓÚ¸´ÖƵÄÓû§
GRANT REPLICATION SLAVE,reload,super ON *.*
TO 'repl'@'%.vm.dba.com' IDENTIFIED BY 'slavepass'
3.ÔÚ´Ó¿âÉÏÉèÖÃÓÃÓÚ¸´ÖƵÄÑ¡Ïî
server-id
master-host
master-user
master-password
--read-only ¸ÃÑ¡ÏîÈôӷþÎñÆ÷Ö»ÔÊÐíÀ´× ......
¶¨ÆÚά»¤ÄãµÄÊý¾Ý±í¡£
¹¤¾ß£ºmysqlcheck myisamchk
mysqlcheck¿Í»§¶Ë¿ÉÒÔ¼ì²éºÍÐÞ¸´MyISAM±í¡£Ëü»¹¿ÉÒÔÓÅ»¯ºÍ·ÖÎö±í¡£
mysqlcheckµÄ¹¦ÄÜÀàËÆmyisamchk£¬µ«Æ乤×÷²»Í¬¡£
Ö÷Òª²î±ðÊǵ±mysqld·þÎñÆ÷ÔÚÔËÐÐʱ±ØÐëʹÓÃmysqlcheck£¬¶ømyisamch ......
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
-> ON bankaccount.*
-> TO 'custom'@'localhost'
-> IDENTIFIED BY 'password';
mysql> GRANT SELECT,INS ......