MySQL Ô¶³ÌÁ¬½Ó
ÎÊÌ⣺Զ³ÌÁ¬½Ó·þÎñÆ÷µÄÊý¾Ý¿â
$ mysql -hserverip -uuser -ppassword
ERROR 1045 (28000): Access denied for user 'user'@'localhost'
(using password: YES)
ÔÒò£ºmysql.user±íÖÐûÓÐÉèÖÃÔ¶³ÌÁ¬½Ó
$ mysql -uroot -ppassword #ÓÃrootÓû§ÔÚserverÉϵǼ
mysql> select host, user, password from mysql.user; #²é¿´mysqlÊý¾Ý¿âuser±íÖеÄÐÅÏ¢
»á·¢ÏÖûÓÐÔ¶³Ì»úÆ÷µÄhost, µ±È»Ò²Ã»ÓÐuser
½â¾ö·½·¨£º
mysql> grant select, update, insert, delete on *.* to user@clientip identified by "password";
ÕâÑùÔÚÔ¶³Ì¿Í»§¶Ëclientip¾Í¿ÉÒÔ·ÃÎÊÊý¾Ý¿âÁË
$ mysql -hserverip -uuser -ppassword
¸½¼Ó£º
Èç¹ûÏëÈÃËùÓеÄÔ¶³Ì»úÆ÷¶¼¿ÉÒÔÓÃuserÓû§·ÃÎÊÊý¾Ý¿â¿ÉÒÔÔÚ·þÎñÆ÷Êý¾Ý¿âÖÐ×öÈçÏÂÉèÖÃ
mysql> grant all on *.* to user@"%" identified by "password";
Ïà¹ØÎĵµ£º
¸ÅÊö£º
1.ÂÒÂëÎÊÌâ¹é¸ùµ½µ×ÊÇ×Ö·û¼¯µÄÎÊÌâ,ÄǾʹÓ×Ö·û¼¯ÉèÖ÷½Ã濼ÂÇ,²»ÍâºõÏÂÃæ¼¸·½Ã棺
server(Mysql·þÎñÆ÷),client,database(Êý¾Ý¿â),connection(Á¬½Ó),result
MySQLµÄ×Ö·û¼¯´¦ÀíÊÇÕâÑùµÄ£º
£¨1£©·¢ËÍÇëÇó
¿Í»§¶Ë(character_set_client£©=¡·Êý¾ ......
Òª°²裝 MySQL£¬¿ÉÒÔÔÚ終¶ËÌáʾ·ûºó運ÐÐÏÂÁÐÃüÁ
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// °²×°php5-mysql Êǽ«phpºÍmysqlÁ¬½ÓÆðÀ´
Ò»µ©°²裝Íê³É£¬MySQL ·þ務Æ÷應該×Ô動啟動¡£Äú¿ÉÒÔ ......
mysqlϵļÓÃܺ¯ÊýÓÐÈçϼ¸¸ö
PASSWORD()£º´´½¨Ò»¸ö¾¹ý¼ÓÃܵÄÃÜÂë×Ö·û´®£¬ÊʺÏÓÚ²åÈëµ½MySQLµÄ°²È«Ïµ
ͳ¡£¸Ã¼ÓÃܹý³Ì²»¿ÉÄæ£¬ºÍunixÃÜÂë¼ÓÃܹý³ÌʹÓò»Í¬µÄËã·¨¡£Ö÷ÒªÓÃÓÚMySQLµÄÈÏ֤ϵͳ¡£
ENCRYPT(£¬)£ºÊ¹ÓÃUNIX crypt()ϵͳ¼ÓÃÜ×Ö·û´®£¬ENCRYPT()º¯Êý½ÓÊÕÒª¼ÓÃܵÄ×Ö·û´®ºÍ£¨¿ÉÑ¡µÄ£©ÓÃÓÚ¼ÓÃܹý³ÌµÄsalt£¨Ò»¸ ......
ÔÎÄת×Ô:http://hi.baidu.com/jackli00/blog/item/21b2e242025bfa1473f05d24.html
Mysql¿ªÆôÈÕÖ¾
2008-11-18 11:23
ÊÇ·ñÆôÓÃÁËÈÕÖ¾
mysql>show variables like 'log_bin';
ÔõÑùÖªµÀµ±Ç°µÄÈÕÖ¾
mysql> show master status;
¿´¶þ½øÖÆÈÕÖ¾ÎļþÓÃmysqlbinlog
shell>mysqlbinlog mail-bin.000001(Ҫд¾ø¶ÔÎÊÌâ ......
ÕûÀítuscany.org.cnµÄ·þÎñÆ÷£¬·¢ÏÖ3ÄêǰдµÄ½Å±¾»¹ÔÚÅÜ×Å :)
½Å±¾ÈçÏ£º
#==========================================================
#!/bin/bash
current_date=`date +%Y-%m-%d:%H:%M:%S`
/usr/local/mysql/bin/mysqldump -prootpass dbname1 > ./DB_DIR/dbname1_"$current_date"_dump_file.sql
......