mysqlĬÈÏÊÇÖ»ÄÜ´Ólocalhost·ÃÎÊ
ËùÒÔ³ýÁ˸øÕË»§È¨ÏÞÒÔÍâ »¹ÓÐÐÞ¸Ä /etc/mysql/my.cnf
ÕÒµ½ bind-address = 127.0.0.1 ÐÞ¸ÄΪ bind-address = 0.0.0.0
ÖØÆômysql : sudo /etc/init.d/mysql restart
·ñÔò»á±¨ ERROR 2003 (HY000): Can't connect to MySQL server on 'x.x.x.x' (111)
ºÃ°É ÎÒÊÇmysql²ËÄñ ÒÔÇ°¶¼ÊÇ×ßlocalhostµÄ
Ïà¹ØÎĵµ£º
1 °²×°MySQL5
ÓÃÏÂÁÐÃüÁî°²×°MySQL£º
yum install mysql mysql-server
È»ºóÎÒÃÇΪMySQL´´½¨ÏµÍ³Æô¶¯Á´½Ó£¨ÕâÑùµÄ»°£¬MySQL¾Í»áËæ×ÅϵͳÆô¶¯¶øÆô¶¯£©£¬²¢Æô¶¯MySQL·þÎñÆ÷£º
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
ÔËÐÐ
mysqladmin -u root password yourrootsqlpassword
À´ÎªrootÓû§ÉèÖà ......
ÏÔʾmysql»ù±¾ÐÅÏ¢£ºmysql>status;
²é¿´±äÁ¿£ºshow variables like '%version%';
±¸·ÝÓ뻹ÔÃüÁÔÚ×îºó»¹ÓÐ
1.±¸·ÝMySQLÊý¾Ý¿âµÄÃüÁî:
ÔÚcmdÖнøÈëµ½mysqlµÄlibĿ¼ÏÂÖ´ÐÐÈçÏ£º
mysqldump -hhostname -uusername -ppassword databaseName > backupfile.sql
Àý£ºmysqldump -hlocalhost -uroot -p123456 test ......
http://blog.c1gstudio.com/archives/602
nagios_plugin°²×°Ê±ÕýÈ·¹ØÁªmysqlºó»áÔÚlibexecϲúÉúcheck_mysqlÎļþ
/usr/local/nagios/libexec/check_mysql -h
check_mysql v2034 (nagios-plugins 1.4.13)
Copyright (c) 1999-2007 Nagios Plugin Development Team
< ......
À´Ô´£ºhttp://www.sudone.com/linux/mysql_debug.html
×÷ÕߣºAyou
ÎÒÒ»Ö±ÊÇʹÓÃmysqlÕâ¸öÊý¾Ý¿âÈí¼þ£¬Ëü¹¤×÷±È½ÏÎȶ¨£¬Ð§ÂÊÒ²ºÜ¸ß¡£ÔÚÓöµ½ÑÏÖØÐÔÄÜÎÊÌâʱ£¬Ò»°ã¶¼ÓÐÕâô¼¸ÖÖ¿ÉÄÜ£º
1¡¢Ë÷ÒýûÓн¨ºÃ£»
2¡¢sqlд·¨¹ýÓÚ¸´ÔÓ£»
3¡¢ÅäÖôíÎó£»
4¡¢»úÆ÷ʵÔÚ¸ººÉ²»ÁË£»
1¡¢Ë÷ÒýûÓн¨ºÃ
Èç¹û¿´µ½mysqlÏûºÄµÄcpuºÜ´ó£¬¿ÉÒÔÓ ......
Æô¶¯£ºnet start mySql;
½øÈ룺mysql -u root -p/mysql -h localhost -u root -p databaseName;
ÁгöÊý¾Ý¿â£ºshow databases;
Ñ¡ÔñÊý¾Ý¿â£ºuse databaseName;
Áгö±í¸ñ£ºshow tables£»
ÏÔʾ±í¸ñÁеÄÊôÐÔ£ºshow columns from tableName£»
½¨Á¢Êý¾Ý¿â£ºsource fileNa ......