锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲日本乱码一区二区在线二产线,亚洲色av性色在线观无码,亚洲日韩精品无码专区网址http://www.tkk7.com/liuyf8688/category/51224.htmlzh-cnSun, 26 Apr 2015 23:23:57 GMTSun, 26 Apr 2015 23:23:57 GMT60ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)http://www.tkk7.com/liuyf8688/articles/424679.htmlliuyf8688liuyf8688Sun, 26 Apr 2015 09:44:00 GMThttp://www.tkk7.com/liuyf8688/articles/424679.htmlhttp://www.tkk7.com/liuyf8688/comments/424679.htmlhttp://www.tkk7.com/liuyf8688/articles/424679.html#Feedback0http://www.tkk7.com/liuyf8688/comments/commentRss/424679.htmlhttp://www.tkk7.com/liuyf8688/services/trackbacks/424679.html1. 閫氳繃DMG鏂瑰紡錛屽畨瑁呭畬MySQL鍚庯紝鍦╯hell鍛戒護琛屼腑灝濊瘯浣跨敤mysql -u root榪炴帴MySQL錛屽嚭鐜頒笅闈㈡彁紺恒?/div>
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

鐢變簬鏍規(guī)嵁鏈湴鐜鍙婅蔣浠剁増鏈紝娌℃湁緇熶竴鐨勮В鍐蟲柟妗堬紝涓嬮潰鎴戝皢璇存槑鎴戠殑杞歡鐜銆?/span>

杞歡璇存槑錛?/span>

Mac OS - 10.10.2 (OS X Yosemite)
MySQL - Ver 14.14 Distrib 5.7.7-rc, for osx10.8 (x86_64)

瑙e喅鏂規(guī)錛堟殏鏃舵病鏈夋壘鍒扮悊鎯蟲柟妗堬紝鎵浠ュ皾璇曢噸緗畆oot瀵嗙爜錛?/div>
1. 鍋滄MySQL錛屼嬌鐢ㄨ煩榪囨潈闄愭帶鍒舵柟妗堝惎鍔?/div>
1.1 浣跨敤Preference Pane鍏抽棴MySQL
MySQL Preference Pane: Location
鍙屽嚮MySQL錛屽彲鑳戒細瑕佹眰浣犺緭鍏ュ瘑鐮侊紝杈撳叆瀵嗙爜鍚庯紝灝嗕細鎵撳紑濡備笅紿楀彛銆?/div>

鐐瑰嚮“Stop MySQL Server”錛岃緭鍏ュ瘑鐮佸悗錛岀豢鑹茬殑“running”灝嗕細鍙樻垚綰㈣壊鐨?#8220;stopped” ,璇存槑MySQL琚甯稿叧闂?/div>
1.2閫氳繃璺寵繃鏉冮檺鎺у埗鍚姩
shell鍛戒護琛岃緭鍏ヤ互涓嬪懡浠ゅ洖杞?/div>
sudo mysqld_safe --skip-grant-tables
杈撳叆綆$悊鍛樺瘑鐮佸悗錛屾樉紺哄涓嬫彁紺猴紝璇存槑鍚姩鎴愬姛
150426 13:32:39 mysqld_safe Logging to '/usr/local/mysql/data/xxxMacBook-Pro.local.err'.
150426 13:32:39 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

2. 濡傛灉浠ヤ笂鍏ㄩ儴鎴愬姛錛岀幇鍦ㄥ彲浠ュ紑濮嬮噸緗畆oot瀵嗙爜浜?/span>
寮鍚柊鐨剆hell紿楀彛錛岃緭鍏ysql -u root錛岀幇鍦ㄥ彲浠ヨ繘鍏ysql浜嗐?/span>
浠婃鎵ц浠ヤ笅鍛戒護銆?/span>
mysql> FLUSH PRIVILEGES;

鏍規(guī)嵁鐗堟湰涓嶅悓錛岃鎵ц涓嶅悓鐨勫懡浠わ細
MySQL 5.7.6 and later:
mysql> ALTER USER root@localhost IDENTITIED BY 123456’;

MySQL 5.7.5 and earlier:
mysql> SET PASSWORD FOR root@localhost = PASSWORD(123456);

3. 鍋滄MySQL鏈嶅姟鍣紝姝e父閲嶅惎銆傜幇鍦ㄤ綘鍙互浣跨敤鏂扮殑瀵嗙爜鐧誨綍root鐢ㄦ埛浜嗐?/span>


liuyf8688 2015-04-26 17:44 鍙戣〃璇勮
]]>Copying a Table in MySQL and including the Primary Keyhttp://www.tkk7.com/liuyf8688/articles/423851.htmlliuyf8688liuyf8688Thu, 26 Mar 2015 03:36:00 GMThttp://www.tkk7.com/liuyf8688/articles/423851.htmlhttp://www.tkk7.com/liuyf8688/comments/423851.htmlhttp://www.tkk7.com/liuyf8688/articles/423851.html#Feedback0http://www.tkk7.com/liuyf8688/comments/commentRss/423851.htmlhttp://www.tkk7.com/liuyf8688/services/trackbacks/423851.htmlCREATE TABLE new_table LIKE old_table;
INSERT INTO new_table SELECT * FROM old_table;


liuyf8688 2015-03-26 11:36 鍙戣〃璇勮
]]>
MySQL 瀛樺偍榪囩▼紺轟緥http://www.tkk7.com/liuyf8688/articles/410700.htmlliuyf8688liuyf8688Thu, 06 Mar 2014 13:41:00 GMThttp://www.tkk7.com/liuyf8688/articles/410700.htmlhttp://www.tkk7.com/liuyf8688/comments/410700.htmlhttp://www.tkk7.com/liuyf8688/articles/410700.html#Feedback0http://www.tkk7.com/liuyf8688/comments/commentRss/410700.htmlhttp://www.tkk7.com/liuyf8688/services/trackbacks/410700.html 1 CREATE DEFINER = 'unisoft'@'%'
 2 PROCEDURE unisoftdb.distributePoolId(IN poolNum int)
 3 BEGIN
 4 
 5     -- 閬嶅巻鍏徃鐨勬父鏍囩粨鏉熸潯浠?br />  6     DECLARE done BOOLEAN DEFAULT FALSE;
 7     -- 鎺ユ敹娓告爣涓叕鍙窱D
 8     DECLARE id_val bigint;
 9     -- 鎺ユ敹娓告爣涓叕鍙哥殑POOL_ID
10     DECLARE poolId_val int;
11     -- 鐢ㄤ簬寰幆poolNum鐨勫驚鐜彉閲?br /> 12     DECLARE i int;
13     -- 瀛樺偍姣忎釜POOL_ID瀵瑰簲鐨勬昏褰曟暟 (緇熻鏈琍OOL_ID鍏寵仈鐨勬墍鏈夊叕鍙歌仈緋諱漢鏁伴噺)
14     DECLARE totalSum int;
15     -- 瀛樺偍渚夌殑POOL_ID
16     DECLARE canPoolId bigint;
17     -- 瀛樺偍渚夌殑POOL_ID瀵瑰簲鐨勮褰曟暟
18     DECLARE minSum int;
19     
20     -- 澹版槑閬嶅巻鍏徃鐨勬父鏍?br /> 21     DECLARE cursor_company_test CURSOR FOR SELECT id, pool_id FROM company_test ORDER BY ID DESC;
22     DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
23 
24     OPEN cursor_company_test;
25 
26     read_loop: LOOP
27 
28       FETCH cursor_company_test INTO id_val, poolId_val;
29 
30       IF done THEN
31         CLOSE cursor_company_test;
32         LEAVE read_loop;
33       END IF;
34       
35       -- 鍙鐞哖OOL_ID涓洪浂鐨勬儏鍐?br /> 36       IF poolId_val = 0 THEN
37 
38         -- 閲嶇疆鍐呭驚鐜彉閲?br /> 39         SET i = 1;
40         SET totalSum = 0;
41         SET minSum = 0;
42         SET canPoolId = 0;
43 
44         pro_loop: LOOP
45           
46           -- 緇熻POOL_ID瀵瑰簲鐨勮褰曟暟
47           SELECT IFNULL(SUM(cp.contact_num), 0) INTO totalSum FROM company_test c INNER JOIN company_property cp ON c.id = cp.id AND c.pool_id = i; 
48 
49           IF i > poolNum THEN
50             LEAVE pro_loop;
51           END IF;
52 
53           IF i = 1 THEN
54             SET minSum = totalSum;
55             SET canPoolId = i;
56           END IF;
57           
58           IF totalSum < minSum THEN
59             SET minSum = totalSum;
60             SET canPoolId = i;
61           END IF;
62 
63           SET i = i + 1;
64         END LOOP pro_loop;
65 
66         -- print pool id
67         UPDATE company_test SET POOL_ID = canPoolId WHERE ID = id_val;
68         -- SELECT id_val, canPoolId;
69 
70       END IF;
71       
72     END LOOP read_loop;
73     
74   END


liuyf8688 2014-03-06 21:41 鍙戣〃璇勮
]]>MySQL鏌ヨ鏃朵細蹇界暐瀛楁鏈熬鐨勭┖鏍?/title><link>http://www.tkk7.com/liuyf8688/articles/403422.html</link><dc:creator>liuyf8688</dc:creator><author>liuyf8688</author><pubDate>Wed, 28 Aug 2013 14:21:00 GMT</pubDate><guid>http://www.tkk7.com/liuyf8688/articles/403422.html</guid><wfw:comment>http://www.tkk7.com/liuyf8688/comments/403422.html</wfw:comment><comments>http://www.tkk7.com/liuyf8688/articles/403422.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/liuyf8688/comments/commentRss/403422.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/liuyf8688/services/trackbacks/403422.html</trackback:ping><description><![CDATA[<img src="http://www.tkk7.com/images/blogjava_net/liuyf8688/MySQL_padspace.png" width="812" height="540" alt="" /><img src ="http://www.tkk7.com/liuyf8688/aggbug/403422.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/liuyf8688/" target="_blank">liuyf8688</a> 2013-08-28 22:21 <a href="http://www.tkk7.com/liuyf8688/articles/403422.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>CentOS 6.0涓嬪畨瑁匨ySQL 5.5.21http://www.tkk7.com/liuyf8688/articles/372636.htmlliuyf8688liuyf8688Sat, 24 Mar 2012 16:20:00 GMThttp://www.tkk7.com/liuyf8688/articles/372636.htmlhttp://www.tkk7.com/liuyf8688/comments/372636.htmlhttp://www.tkk7.com/liuyf8688/articles/372636.html#Feedback0http://www.tkk7.com/liuyf8688/comments/commentRss/372636.htmlhttp://www.tkk7.com/liuyf8688/services/trackbacks/372636.html
1.瀹夎cmake
    (1)www.cmake.org涓嬭澆鏈鏂板寘銆?/span>
    (2)緙栬瘧瀹夎
        ./bootstrap (絎竴嬈″畨瑁咃紝濡傛灉宸插畨瑁卌make錛涘彲浠ヤ嬌鐢╟make cmake瑙e帇鐩綍)
        make
        make install
2.瀹夎MySql
    (1)鍒涘緩甯愬彿
        groupadd mysql
        useradd -r -g mysql mysql
    (2)瑙e帇騫剁紪璇戝畨瑁?/span>
        tar zxvf mysql-VERSION.tar.gz
        cd mysql-VERSION
        // cmake [-DCMAKE_INSTALL_PREFIX=dir_name -DDEFAULT_CHARSET=charset_name -DDEFAULT_COLLATION=collation_name](optional) .
        cmake -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci .
        (charset: utf8; collation: utf8_general_ci)
        make
        make install
    (3)璁劇疆mysql瀹夎鐩綍鐨勫綊妗d俊鎭?/span>
        cd /usr/local/mysql
        chown -R mysql .
        chgrp -R mysql .
        chown -R root .
        chown -R mysql data
    (5)瀹夎鏁版嵁搴?/span>
        scripts/mysql_install_db --user=mysql
    (6)鏇挎崲my.cnf鏂囦歡
        cp support-files/my-medium.cnf /etc/my.cnf
    (7)鍚姩MySQL
        nohup bin/mysqld_safe --user=mysql &
        濡傛灉鍚姩涓嶆垚鍔燂紝鎵ц浠ヤ笅鍛戒護錛?/span>
        cat data/localhost.localdomain.err
        濡傛灉鍑虹幇12姝ョ殑闂錛屽彲鑳芥槸鏁版嵁搴撴病鏈夊畨瑁呮垚鍔燂紝閲嶆柊鎵ц絎?姝ワ紱鐒跺悗閲嶆柊鎵ц絎?姝ャ?/span>
    (8)瀵逛簬鐢熶駭鐜鏉ヨ錛岃繕闇瑕佸仛浠ヤ笅鎿嶄綔
        ./bin/mysqladmin -u root password 'new-password'
        ./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
        鎴?/span>
        ./bin/mysql_secure_installation
    (9)璁劇疆緋葷粺鍚姩鏃訛紝鍚姩MySQL
        cp support-files/mysql.server /etc/init.d/mysql
        chmod +x /etc/init.d/mysql
        chkconfig --add /etc/init.d/mysql
    (10)鍒涘緩鐢ㄦ埛騫舵巿鏉冭繙紼嬭闂?/span>
        ./bin/mysql -u root -p (榪涘叆mysql鍛戒護琛?    
        insert into mysql.user(host, user, password) values ("localhost", "mysql", password("123456"));
        grant all privileges on *.* to 'mysql'@'%' identified by '123456';
        flush privileges;
    (11)閰嶇疆iptables錛屽紑鏀緈ysql绔彛
        vi /etc/sysconfig/iptables
        鍦–OMMIT鍓嶏紝娣誨姞涓嬮潰榪欏彞璇濓細
            -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
        service iptables save
        service iptables restart
    (12)瑙e喅浠ヤ笅闂
        (10.1)/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
        (10.2)[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
        
        鍑虹幇浠ヤ笂闂錛屾槸鐢變簬mysql_install_db瀹夎涓嶅錛岃閲嶆柊瀹夎銆?/span>
        
        
        
    娉細1.鏌ユ壘mysql_install_db鐨勪綅緗?/span>
        find / -name mysql_install_db
        
        
    Installing MySQL system tables...
    OK
    Filling help tables...
    OK
    
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    
    ./bin/mysqladmin -u root password 'new-password'
    ./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
    
    Alternatively you can run:
    ./bin/mysql_secure_installation
    
    which will also give you the option of removing the test
    databases and anonymous user created by default.  This is
    strongly recommended for production servers.
    
    See the manual for more instructions.
    
    You can start the MySQL daemon with:
    cd . ; ./bin/mysqld_safe &
    
    You can test the MySQL daemon with mysql-test-run.pl
    cd ./mysql-test ; perl mysql-test-run.pl
    
    Please report any problems with the ./bin/mysqlbug script!

    


liuyf8688 2012-03-25 00:20 鍙戣〃璇勮
]]> 主站蜘蛛池模板: 日韩亚洲Av人人夜夜澡人人爽| 美女黄网站人色视频免费国产| 亚洲熟妇无码另类久久久| 人人爽人人爽人人片A免费| 国产在线观看免费视频播放器| 亚洲精品V天堂中文字幕| 男男AV纯肉无码免费播放无码 | 国产成人精品免费视| 亚洲宅男永久在线| 久久精品毛片免费观看| 亚洲福利一区二区精品秒拍| 57pao一国产成视频永久免费| 91亚洲国产在人线播放午夜| 国产精品免费网站| 亚洲性无码一区二区三区| 蜜桃精品免费久久久久影院| 国产成人高清亚洲一区91| 精品国产香蕉伊思人在线在线亚洲一区二区 | 人人爽人人爽人人片A免费 | 亚洲欧洲日韩国产综合在线二区| 蜜桃视频在线观看免费视频网站WWW| 自怕偷自怕亚洲精品| 国产情侣激情在线视频免费看| 亚洲七久久之综合七久久| 免费永久在线观看黄网站| 一区二区三区免费在线观看| 久久精品国产亚洲| 免费H网站在线观看的| 在线观看亚洲精品专区| 国产亚洲AV夜间福利香蕉149 | 久久国产精品亚洲综合 | 麻豆亚洲AV成人无码久久精品| 无码专区一va亚洲v专区在线| 国产亚洲精品免费视频播放 | 亚洲熟妇成人精品一区| 亚洲国产专区一区| 91精品成人免费国产片| 男性gay黄免费网站| 亚洲天堂中文字幕| 国产又黄又爽又猛的免费视频播放 | 亚洲s码欧洲m码吹潮|