Linux source installation MySQL 5.5

Source: Internet
Author: User

      Today in Ubuntu and CentOS, with the source repeatedly installed many times MySQL, before you forget, hurriedly write down ...       The installation process in Ubuntu and CentOS is no different.      0. Download the source code and upload it to the server      1. Prepare CMake and libncurse          Ubuntu apt- Get install CMake and Apt-get install Libncurse installation           CentOS with yum-y install Ncurses-devel and Yum -Y install CMake installation. Some versions use Yum-y install cmake28.x86_64     2. Create a MySQL user           groupadd MySQL           useradd mysql-g mysql-s/sbin/nologin     3. Create the installation directory and authorize           mkdir-p/usr/local/mysql/data        & Nbsp; chown-r mysql.mysql/usr/local/mysql     4. Extracting and installing           tar ZXVF mysql-5.5.47.tar.gz          cd mysql-5.5.47           mkdir Build #建Create a build file to let the source code and compile the generated files separately, check the file more convenient.           CD build          cmake28 .. -dcmake_install_prefix=/usr/local/mysql \   #安装目录                   -dmysql_unix_addr=/usr/local/mysql/mysql.sock     #使用的套接字路径         & nbsp        -ddefault_charset=utf8     #指定服务器默认字符集                  -ddefault_collation=utf8_general_ci \     # Specify server default proofing rules                  -dwith_extra_charsets: STRING=UTF8,GBK \   #安装需要的字符集                   - dwith_innobase_storage_engine=1 \     #支持InnoDB引擎               & nbsp;  -dwith_readline=1 \ &nbsp                      -denabled_local_infile=1 \ & nbsp    #指定是否允许本地执行LOAD DATA infile                 - dmysql_datadir=/usr/local/mysql/data/\     #数据存放位置                   -dmysql_tcp_port=3306     #默认端口            Do && make install     5. Add the MySQL configuration file to/etc/          CP SUPPORT-FILES/MY-SMALL.CNF/ETC/MY.CNF     #mysql配置文件            chmod 755 scripts/mysql_install_db     #执行权限           scripts/mysql _install_db --user=mysql --basedir=/usr/local/mysql--datadir=/usr/local/mysql/data/    #初始化           CP Support-fiLes/mysql.server/etc/init.d/mysqld     #启动程序           chmod 755/ Etc/init.d/mysqld     #执行权限      6. Start service           service mysqld STA rt     7. Add password           /usr/local/mysql/bin/mysqladmin-u root password ' passwd

Linux source installation MySQL 5.5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.