linux mysqlµÄ°²×°¼°Ò»Ð©ÅäÖ÷½·¨
1.¼ì²éÒÔǰ°²×°µÄMySQL,Ð¶ÔØ¡£
rpm -qa|grep -i mysql
rpm -e XXXXX
×¢Èç¹û³öÏÖÁ½ÌõÏàͬµÄ£¬ÔòʹÓÃrpm -e --allmatches
2.°²×°rpm°ü¡£
rpm -ivh MySQL-server-community-5.1.37-0.rhel5.x86_64.rpm
rpm -ivh MySQL-shared-community-5.1.37-0.rhel5.x86_64.rpm
rpm -ivh MySQL-devel-community-5.1.37-0.rhel5.x86_64.rpm
rpm -ivh MySQL-client-community-5.1.37-0.rhel5.x86_64.rpm
3.cp ²ÎÊýÎļþµ½ /etc/my.cnf
find / -name "my*.cnf"
Ìí¼Ó²ÎÊý
transaction-isolation=READ-COMMITTED
default-storage-engine=INNODB
innodb_flush_log_at_trx_commit=2
4.¸üÐÂȨÏÞ¼°Óû§
mysql -u root -p
use mysql;
select user,host from user;
delete from user where user <> 'root';
delete from user where host <> 'localhost';
update user set host ='%' where user ='root';
select user,host from user;
¸üÐÂuser±íµ½ÈçÏÂ״̬
mysql> select user,host from user;
+------+------+
| user | host |
+------+------+
| root | % |
+------+------+
1 row in set (0.00 sec)
´´½¨Óû§
grant select,insert,update,delete,create,drop,alter,index,RELOAD, lock tables, execute, create routine, alter routine,Create temporary tables
on *.* to mysql@"%" identified by "123456";
set global transaction isolation level read committed;
set session transaction isolation level read committed;
¸üÐÂȨÏÞ
flush privileges;
5.ÉèÖÃÃÜÂë(123456)
mysqladmin -u root -p password ×××
####mysqladmin -u root -p password mypasswd
6.ÖØÆô·þÎñ£¬ÑéÖ¤ÉèÖá£
/etc/init.d/mysql restart
怫mysql
Ð¶ÔØÇý¶¯
rpm -e --justdb mysql-connector-odbc-5.1.5-0
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1234 K
bytes of memory
MySQL Íü¼Ç¿ÚÁîµÄ½â¾ö°ì·¨
Èç¹û MySQL ÕýÔÚÔËÐУ¬Ê×ÏÈɱ֮£º killall -TERM mysqld¡£
Æô¶¯ MySQL £ºbin/safe_mysqld --skip-grant-tables &
¾Í¿ÉÒÔ²»ÐèÒªÃÜÂë¾Í½øÈë MySQL ÁË¡£
È»ºó¾ÍÊÇ
use mysql;
update user set password=password("new_pass") where user="root";
update user set password=password(
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
Ò»¡¢½ø³Ì¿ØÖÆ£º
fork
´´½¨Ò»¸öнø³Ì
clone
°´Ö¸¶¨Ìõ¼þ´´½¨×Ó½ø³Ì
execve
ÔËÐпÉÖ´ÐÐÎļþ
exit
ÖÐÖ¹½ø³Ì
_exit
Á¢¼´ÖÐÖ¹µ±Ç°½ø³Ì
getdtablesize
½ø³ÌËùÄÜ´ò¿ªµÄ×î´óÎļþÊý
getpgid
»ñȡָ¶¨½ø³Ì×é±êʶºÅ
setpgid
ÉèÖÃÖ¸¶¨½ø³Ì×é±êÖ¾ºÅ
getpgrp
»ñÈ¡µ±Ç°½ø³Ì×é±êʶºÅ
setpgrp
ÉèÖõ±Ç°½ø³Ì×é±êÖ¾ºÅ
g ......
1. Ubuntu
Ubuntu ϵͳÆô¶¯ÏȶÁÎļþ/etc/event.d/rc-default ÎļþÀ´¶ÁÒªÏÈÖ´ÐеĿª»úÎļþ£¬rc-default½Å±¾ÖÐÓÐÌõ¼þ/etc/inittabÈç¹û´æÔÚÔòÏÈÖ´ÐÐ/etc/inittab·ñÔòÏÈÖ´ÐÐ/etc/rc2.d.ÓÉÓÚ/etc/inittabÔÚUbuntuÖв»´æÔÚ£¬ËùÒÔÏÈÖ´ÐÐrc2.d.¼´¿ª»úÎļþºÍ·þÎñ¿ÉдÔÚ¸ÃĿ¼Ï£¨·þÎñÆô¶¯½Å±¾´æ·ÅµÄλÖã©
2. SUSE
SUSEÏµÍ ......
1.ÆÕͨlog
¼Ç¼ËùÓÐsql²Ù×÷£¬°üÀ¨select£¬showÓï¾ä¡£
ÉèÖÃ
ĬÈÏÊDz»´ò¿ª´Ëlog¡£
´ò¿ªÊ±¿ÉÒÔÖ¸¶¨Ä¿Â¼£¬²»Ö¸¶¨Ê±±£´æÔÚÊý¾Ý¿â¼Ŀ¼Ï¡£
[mysqld]
log = /data/logs/mysql.log #´Ë·½Ê½ÎªÖ¸¶¨Îļþ
log = 1 ......
Ñ¡¶¨Ðеķ¶Î§£º£¬¶ººÅ
$ sed -n '/test/,/check/p'
example--ËùÓÐÔÚÄ£°åtestºÍcheckËùÈ·¶¨µÄ·¶Î§ÄÚµÄÐж¼±»´òÓ¡¡£
$ sed -n '5,/^test/p'
example--´òÓ¡´ÓµÚÎåÐпªÊ¼µ½µÚÒ»¸öÒÔtest¿ªÊ¼µÄÐÐÖ®¼äµÄËùÓÐÐС£
$ sed '/test/,/check/s/$/sed te ......