安裝 mysql-5.6.4-m7

來源:互聯網
上載者:User

標籤:style   blog   http   color   io   strong   檔案   for   

1、首先下載:http://cdn1.mydown.yesky.com/soft/201403/mysql-5.6.4-m7.tar.gz

2、解壓,進入目錄,執行cmake ./(如果沒有cmake,那麼安裝 sudo yum install cmake),可能出錯:

CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.

那麼安裝:sudo yum install gcc-c++ -y

如果還有錯誤:

CMake Error at cmake/readline.cmake:82 (MESSAGE):Curses library not found.  Please install appropriate package,remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.

安裝:yum install ncurses-devel -y

3、make & sudo make install

4、配置mysql

4.1 進入script目錄

4.2 sudo chmod +x mysql_install_db

4.3 sudo ./mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/ --user=mysql

To start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/local/mysql/bin/mysqladmin -u root password ‘new-password‘/usr/local/mysql/bin/mysqladmin -u root -h l-data2.tkt.cn6 password ‘new-password‘Alternatively you can run:/usr/local/mysql/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default.  This isstrongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.plcd /usr/local/mysql/mysql-test ; perl mysql-test-run.plPlease report any problems with the /usr/local/mysql/scripts/mysqlbug script!

仔細看上面的提示。

4.4 添加設定檔

[[email protected] /tmp/mysql-5.6.4-m7/scripts]$ cd /usr/local/mysql/support-files/[[email protected]-data2.tkt.cn6 /usr/local/mysql/support-files]$ sudo cp my-medium.cnf /etc/my.cnf[[email protected]-data2.tkt.cn6 /usr/local/mysql/support-files]$ sudo cp mysql.server /etc/init.d/mysqld

5、啟動服務:

[[email protected] /usr/local/mysql/support-files]$ sudo service mysqld startStarting MySQL.                                            [  OK  ]

6、進入mysql

參考:

http://blog.sina.com.cn/s/blog_7bd720d4010181xg.html

http://www.jb51.net/article/42548.htm

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.