centos mysql 安裝以及遠端登入的開啟

2021-06-07 05:17:43 字數 1843 閱讀 4500

./configure

make 

make install

bison

cmake

make

bzr2.開始搞mysql

解壓mysql-5.5.25.tar.gz

tar zxvf mysql-5.5.25.tar.gz

cd mysql-5.5.25

cmake . \

-dcmake_install_prefix=/mysql/mysqldir \

-dmysql_datadir=/mysql/mysqldir/data \

-dwith_innobase_storage_engine=1 \

-dmysql_tcp_port=3306 \

-dmysql_unix_addr==/mysql/mysqldir/data/mysql.sock \

-dmysql_user=mysql \

-dwith_debug=0

報錯(如無報錯直接make & make install 即可):

cmake error at cmake/readline.cmake:82 (message):

remove cmakecache.txt and rerun cmake.on debian/ubuntu, package name is libncurses5-dev, on redhat and derivates it is ncurses-devel.

call stack (most recent call first):

cmake/readline.cmake:126 (find_curses)

cmake/readline.cmake:216 (mysql_use_bundled_libedit)

cmakelists.txt:256 (mysql_check_readline)

-- configuring incomplete, errors occurred!

缺少包:ncurses-devel

解決:rpm -ivh ncurses-devel*.rpm

或者   yum install ncurses-devel*.rpm

rm -f cmakecache.txt

cmake . \

-dcmake_install_prefix=/mysql/mysqldir \

-dmysql_datadir=/mysql/mysqldir/data \

-dwith_innobase_storage_engine=1 \

-dmysql_tcp_port=3306 \

-dmysql_unix_addr==/mysql/mysqldir/data/mysql.sock \

-dmysql_user=mysql \

-dwith_debug=0

make

make install

完成後進入mysql安裝目錄

cd /mysql/mysqldir

cp support-files/my-huge.cnf /etc/my.cnf

vi /etc/my.cnf

將資料目錄和套接字檔案修改為實際值.

修改許可權

chown mysql:mysql /etc/my.cnf

chown -r mysql:mysql /mysql/mysqldir

切換使用者進入安裝目錄

su - mysql

cd /mysql/mysqldir

cp scripts/mysql_install_db .

./mysql_install_db

啟動mysql

bin/mysqld_safe &

CentOS mysql安裝以及使用

前言 如何檢視linux伺服器的各個狀態?版本查詢 123 4567 89 lsb release a lsb version core 4.1 amd64 core 4.1 noarch distributor id centos description centos linux release ...

centos mysql 安裝以及解除安裝重新安裝

檢視是否還有mysql軟體 rpm qa grep mysql 解除安裝mysql相關依賴 yum remove mysql mysql server mysql libs mysql server 將找到的相關東西delete掉 find name mysql rm etc my.cnf rm r...

centos mysql安裝與解除安裝

解壓重新命名 tar zxvf mysql 5.7.25 linux glibc2.12 x86 64.tar.gz c usr local mv usr local mysql 5.7.25 linux glibc2.12 x86 64 usr local mysql 建立data目錄 mkdir...