使用cmake方式安装mysql-5.5.10
1.需要先安装cmake #tar zxf cmake-2.8.3.tar.gz #cd cmake-2.8.3/ #./bootstrap gmake gmake install 2.mysql安装 #grou
首页 → 数据库技术
背景:
阅读新闻
使用cmake方式安装mysql-5.5.10
[日期:2012-07-31] 来源:Linux社区 作者:baiying [字体:]
1.需要先安装cmake
#tar zxf cmake-2.8.3.tar.gz
#cd cmake-2.8.3/
#./bootstrap && gmake && gmake install
2.mysql安装
#groupadd mysql
#useradd -g mysql mysql -s /sbin/nologin
#mkdir -p /data/mysql
#chown -R mysql.mysql /data/mysql
#chmod 755 /data/mysql
#tar zxf mysql-5.5.10.tar.gz
#cd mysql-5.5.10
#cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.5.10 \
-DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DMYSQL_DATADIR=/data/mysql/mysql -DMYSQL_USER=mysql
#make && make install
#ln -s /usr/local/mysql-5.5.10/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18
#cd support-files/
#cp my-large.cnf /etc/my.cnf
#cp mysql.server /etc/init.d/mysql
#chmod 755 /etc/init.d/mysql
#chkconfig --level 345 mysql on
#/usr/local/mysql-5.5.10/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql-5.5.10 --datadir=/data/mysql/ --user=mysql
编辑/etc/init.d/mysql文件,修改其中的basedir和datadir路径
#service mysql start
MySQL主从复制中出现的error和解决办法
MySQL互为主从Replication
相关资讯 MySQL安装 CMake
图片资讯
本文评论 查看全部评论 (0)
评论声明
最新资讯
本周热门
Linux公社简介 - 广告服务 - 网站地图 - 帮助信息 - 联系我们
本站(LinuxIDC)所刊载文章不代表同意其说法或描述,,仅为提供更多信息,也不构成任何建议。
Copyright © 2006-2014 Linux公社 All rights reserved 浙ICP备06018118号

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Configuration Guide for Building Linux Kernel Modules Using CMake Introduction: CMake is a cross-platform build tool that can help developers manage and build projects more conveniently. When developing Linux kernel modules, using CMake can simplify the configuration and compilation process and improve development efficiency. This article will introduce how to use CMake to configure and build Linux kernel modules, with code examples. 1. Install CMake Before starting, we need to install CMake first. On Ubuntu, you can pass

Overview of the configuration guide for building the Linux kernel using CMake In Linux development, building and configuring the kernel is an important step. For most people, using Kconfig and Makefile is the most common configuration method. However, using CMake to build and configure the Linux kernel is also a flexible and powerful option. This article will introduce how to use CMake to build and configure the Linux kernel, with some code examples. Install CMake First, we need to install CMak

Preface: Recently, I suddenly wanted to transfer the development environment to Linux. At the same time, I was also preparing to read some open source codes on github. I found that open source projects are now generally managed with cmake. So I just tinkered with it on my own virtual machine. I didn't know what cmake was at first, but later I roughly understood its role through some fiddling. What it does is actually tell the compiler how to compile and link the source code. You may want to ask if there is no makefile, why do you need it? This involves cross-platform issues. Under the Windows platform, these are managed through project files. If cmake is not used, then we have to write corresponding project files and make for window and Linux systems.

The main reasons for MySQL installation failure are: 1. Permission issues, you need to run as an administrator or use the sudo command; 2. Dependencies are missing, and you need to install relevant development packages; 3. Port conflicts, you need to close the program that occupies port 3306 or modify the configuration file; 4. The installation package is corrupt, you need to download and verify the integrity; 5. The environment variable is incorrectly configured, and the environment variables must be correctly configured according to the operating system. Solve these problems and carefully check each step to successfully install MySQL.

The article introduces the operation of MySQL database. First, you need to install a MySQL client, such as MySQLWorkbench or command line client. 1. Use the mysql-uroot-p command to connect to the server and log in with the root account password; 2. Use CREATEDATABASE to create a database, and USE select a database; 3. Use CREATETABLE to create a table, define fields and data types; 4. Use INSERTINTO to insert data, query data, update data by UPDATE, and delete data by DELETE. Only by mastering these steps, learning to deal with common problems and optimizing database performance can you use MySQL efficiently.

Configuration tips for using CMake to build Linux applications Introduction: In Linux development, using CMake as a build tool can greatly simplify the project management and build process. CMake is a cross-platform build system that can generate corresponding build files based on the characteristics and requirements of different platforms, such as Makefile or Visual Studio solutions. This article will introduce some configuration techniques for building Linux applications using CMake, and provide code examples to help readers

Configuration tips for building Linux smart logistics applications using CMake Summary: CMake is a cross-platform build tool that can be used to automate building and managing projects. In this article, we will introduce how to configure and build a Linux smart logistics application using CMake. We will focus on the basic configuration and common functions of CMake, and how to demonstrate its usage through sample code. Introduction to CMakeCMake is an open source cross-platform build tool that can be used to automatically generate project structures.

Configuration tips for building Linux smart agriculture applications using CMake Summary: With the continuous development of agricultural technology, smart agriculture applications are gradually receiving attention. When developing and building smart farming applications, choosing the appropriate build tools is crucial. CMake is a cross-platform tool for building, testing and packaging C/C++ applications. This article will introduce how to use CMake to configure the build process of Linux smart agriculture applications and provide corresponding sample code. Introduction to CMakeCMa
