首页 > 数据库 > MySQL > 正文

linux下安装mysql数据库5.6源码安装,修改登录用户密码

2024-07-24 12:50:55
字体:
来源:转载
供稿:网友

本篇内容主要给大家讲解一下如何在linux下安装MYSQL数据库,并以安装MYSQL5.6版本为例子教给大家进行登录用户名和密码的修改等操作。

源码下载地址http://dev.mysql.com/downloads/mysql/5.6.html#downloads

tar.gz地址:https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.37.tar.gz

选择Generic Linux (Architecture Independent), Compressed TAR Archive

选择 No thanks, just start my download. 开始下载

操作系统:

centos6.5 x86_64

一、yum安装相关依赖

# yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake bison git openssl openssl-devel

二、编译安装

1.添加用户

groupadd mysql

useradd -r -g mysql mysql

2.编译安装

tar xf mysql-5.6.34.tar.gz

cd mysql-5.6.34

#默认情况下是安装在/usr/local/mysql

# cmake编译参数可以自己调整

************************************************************** -- Looking for asprintf -- Looking for asprintf - found -- Check size of pthread_t -- Check size of pthread_t - done -- Using cmake version 2.8.12.2 -- Not building NDB -- Performing Test HAVE_PEERCRED -- Performing Test HAVE_PEERCRED - Success -- Library mysqlclient depends on OSLIBS -lpthread;/usr/lib64/libz.so;m;rt;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl -- Googlemock was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source. -- If you are inside a firewall, you may need to use an http proxy: export http_proxy=http://example.com:80 -- Library mysqlserver depends on OSLIBS -lpthread;/usr/lib64/libz.so;m;rt;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl;crypt -- CMAKE_BUILD_TYPE: RelWithDebInfo -- COMPILE_DEFINITIONS: HAVE_CONFIG_H -- CMAKE_C_FLAGS: -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -- CMAKE_CXX_FLAGS: -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -- CMAKE_C_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: WITH_READLINE -- Build files have been written to: /root/mysql-5.6.34

**************************************************************
cmake编译报错需要删除编译缓存,修复错误后再次重新编译

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表