zoukankan      html  css  js  c++  java
  • MySQL的安装

    正式安装MySQL之前,需要安装三个个组件,一个是Cmake(mysql软件的安装编译软件),一个是ncurese(提供终端字符处理库,一个是perl(称为“实用报表提取语言)
    两个软件的下载地址为
    Cmake: http://www.cmake.org/files/v3.0/cmake-3.0.0.tar.gz 
    ncursese:ftp://invisible-island.net/ncurses/ncurses.tar.gz
     
    http://www.cpan.org/src/5.0/perl-5.20.0.tar.gz
    使用tar xzvf解压之后,进行目录,依次使用
    shell>./configure 
    shell>make
    shell>make install
    即可成功安装。

    正式安装MySQL的安装:
    下载地址:http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.19.tar.gz
    使用tar xzvf 进入解压缩文件目录。使用如下命令安装:
    shell>cmake .
    shell>make
    shell>make install ,默认安装到/usr/local/mysql目录。
    进入安装目录:shell>cd /usr/local/mysql
    建立mysql用户和组
    shell>groupadd mysql
    shell>useradd -r -g mysql mysql
    shell> chown -R mysql .
    shell>chgrp -R mysql .
    shell>scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --ldata=/var/lib/mysql
    shell>chown -R root .
    shell>chown -R mysql data
     
    shell> mkdir /var/run/mysqld
     shell> touch /var/run/mysqld/mysqld.pid
     shell> chown -R mysql:mysql /var/run/mysqld
     shell>chmod -R 755 /var/run/mysqld
    shell> bin/mysqld_safe  --user=mysql &
    shell> cp support-files/mysql.server /etc/init.d/mysql.server
       

    To start mysqld at boot time you have tocopy

    support-files/mysql.server to the rightplace for your system

    PLEASE REMEMBER TO SET A PASSWORD FOR THEMySQL root USER !

    To do so, start the server, then issue thefollowing commands:

      ./bin/mysqladmin -u root password'new-password'

      ./bin/mysqladmin -u root -h server.sanm.orgpassword 'new-password'

    Alternatively you can run:

      ./bin/mysql_secure_installation

    which will also give you the option ofremoving the testdatabases and anonymous user created by default.  This isstrongly recommended for productionservers.See the manual for more instructions.

    You can start the MySQL daemon with:

    cd .; ./bin/mysqld_safe &

    You can test the MySQL daemon withmysql-test-run.pl

      cd mysql-test ; perl mysql-test-run.pl

    Please report any problems athttp://bugs.mysql.com/

    The latest information about MySQL isavailable on the web at http://www.mysql.com

    Support MySQL by buying support/licenses athttp://shop.mysql.com New default configfile was created as ./my.cnf and will be used by default by the server when youstart it. You may edit this file to change server settings

    WARNING: Default config file /etc/my.cnfexists on the system This file will be read by default by the MySQL server Ifyou do not want to use this, either remove it, or use the --defaults-fileargument to mysqld_safe when starting the server

    每天更新一点点,温习一点点点,进步一点点
  • 相关阅读:
    AW245 你能回答这些问题吗(连续子段和线段树)
    AW256 最大异或和(可持久化0/1trie树)
    AW247 亚特兰蒂斯(区间覆盖线段树)
    P1616 疯狂的采药
    P1060 开心的金明
    AW252 树(点分治)
    AW250 磁力块(分块)
    php绘图(一)
    判断一个文件里面有多少各种格式的图片
    添加图片水印图标
  • 原文地址:https://www.cnblogs.com/lmgsanm/p/4236607.html
Copyright © 2011-2022 走看看