锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲色在线无码国产精品不卡,青青青国产色视频在线观看国产亚洲欧洲国产综合 ,亚洲精品无码久久久久久久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)

鐢變簬鏍規嵁鏈湴鐜鍙婅蔣浠剁増鏈紝娌℃湁緇熶竴鐨勮В鍐蟲柟妗堬紝涓嬮潰鎴戝皢璇存槑鎴戠殑杞歡鐜銆?/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喅鏂規錛堟殏鏃舵病鏈夋壘鍒扮悊鎯蟲柟妗堬紝鎵浠ュ皾璇曢噸緗畆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;

鏍規嵁鐗堟湰涓嶅悓錛岃鎵ц涓嶅悓鐨勫懡浠わ細
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日韩av综合| 亚洲人成人77777网站不卡| 亚洲av乱码一区二区三区香蕉| 男人的天堂av亚洲一区2区| 久青草视频在线观看免费| 九月丁香婷婷亚洲综合色| 亚洲精品无码久久久久久久| 中文字幕亚洲第一在线| 亚洲а∨精品天堂在线| 国产成人精品亚洲| 久久午夜伦鲁片免费无码| 日韩免费观看一级毛片看看| 亚洲AV永久无码精品成人| 亚洲乱亚洲乱妇24p| 久艹视频在线免费观看| 国产片免费福利片永久| 亚洲美女视频网址| 成人午夜影视全部免费看| 国产在线观看片a免费观看| 亚洲精品无码久久久久sm| 亚洲精华国产精华精华液 | 精品韩国亚洲av无码不卡区 | 国产精品久久免费| 中文字幕亚洲日本岛国片| 亚洲GV天堂GV无码男同| 91av在线免费视频| 亚洲色偷拍另类无码专区| 亚洲变态另类一区二区三区| 1000部禁片黄的免费看| 中文字幕亚洲激情| 国产亚洲Av综合人人澡精品| 在线视频观看免费视频18| 久久精品国产亚洲av麻豆| 乱人伦中文视频在线观看免费| 可以免费看的卡一卡二| 久久精品亚洲综合一品| 一个人免费播放在线视频看片| 日本免费网站在线观看| 亚洲国产精品一区二区久| 久久国产乱子免费精品| 亚洲综合在线另类色区奇米|