zoukankan      html  css  js  c++  java
  • 安装 mysql-5.6.4-m7

    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 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:
    
    /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_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 /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
    
    You can test the MySQL daemon with mysql-test-run.pl
    cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl
    
    Please report any problems with the /usr/local/mysql/scripts/mysqlbug script!

    仔细看上面的提示。

    4.4 添加配置文件

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

    5、启动服务:

    [qiu.li@l-data2.tkt.cn6 /usr/local/mysql/support-files]$ sudo service mysqld start
    Starting MySQL.                                            [  OK  ]

    6、进入mysql

    参考:

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

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

  • 相关阅读:
    支付宝移动支付开发详细教程服务端采用.net mvc webapi(C#)
    微信移动支付V3开发详细教程服务端采用.net mvc webapi(C#)
    CSS border-radius 圆角
    CSS hack大全&详解(什么是CSS hack)
    一小时搞定DIV+CSS布局-固定页面开度布局
    ASP.NET MVC3开发
    .net mvc页面UI之Jquery博客日历控件
    ASP.NET MVC3开发-数据库篇之CodeFisrt开发(一)
    ASP.NET MVC页面UI之联动下拉选择控件(省、市、县联动选择)
    Jquery文本框值改变事件(支持火狐、ie)
  • 原文地址:https://www.cnblogs.com/liqiu/p/3922225.html
Copyright © 2011-2022 走看看