最全的mysql 5.7.13 裝置設置裝備擺設辦法圖文教程(linux) 激烈推舉!。本站提示廣大學習愛好者:(最全的mysql 5.7.13 裝置設置裝備擺設辦法圖文教程(linux) 激烈推舉!)文章只能為提供參考,不一定能成為您想要的結果。以下是最全的mysql 5.7.13 裝置設置裝備擺設辦法圖文教程(linux) 激烈推舉!正文
linux情況Mysql 5.7.13裝置教程分享給年夜家,供年夜家參考,詳細內容以下
1體系商定
裝置文件下載目次:/data/software
Mysql目次裝置地位:/usr/local/mysql
數據庫保留地位:/data/mysql
日記保留地位:/data/log/mysql
2下載mysql
在官網:http://dev.mysql.com/downloads/mysql/ 中,選擇以下版本的mysql下載:
履行以下定名:
#mkdir /data/software
#cd /data/software
#wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
3解壓緊縮包到目的地位
# mkdir /usr/local/mysql
#cd /dat/software
#pwd
履行後以下:
#ls
#cd /usr/local
#pwd
# tar -xzvf /data/software/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
#ls
--修正文件名
# mv mysql-5.7.13-linux-glibc2.5-x86_64 mysql
#ls
4創立數據倉庫目次
--/data/mysql 數據倉庫目次
# mkdir /data/mysql
#ls /data/
5新建mysql用戶、組及目次
# ---新建一個msyql組
# useradd -r -s /sbin/nologin -g mysql mysql -d /usr/local/mysql ---新建msyql用戶制止登錄shell
6轉變目次屬有者
#cd /usr/local/mysql
#pwd
#chown –R mysql .
#chgrp –R mysql .
#chown -R mysql /data/mysql
7設置裝備擺設參數
# bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql
此處須要留意記載生成的暫時暗碼,如上文:YLi>7ecpe;YP
#bin/mysql_ssl_rsa_setup --datadir=/data/mysql
8修正體系設置裝備擺設文件
# cp my-default.cnf /etc/my.cnf
# cp mysql.server /etc/init.d/mysql
# vim /etc/init.d/mysql
修正以下內容:
# vim /etc/my.cnf
修正以下內容:
9啟動mysql
#bin/mysqld_safe --user=mysql &
bin/mysql --user=root –p
--輸出第6步生成的暫時暗碼
mysql> set password=password('A123456');
mysql>grant all privileges on *.* to root@'%' identified by 'A123456';
mysql> flush privileges;
mysql> use mysql;
mysql> select host,user from user;
10添加體系途徑
# vim /etc/profile
添加:
export PATH=/usr/local/mysql/bin:$PATH
以下:
# source /etc/profile
11設置裝備擺設mysql主動啟動
# chmod 755 /etc/init.d/mysql
# chkconfig --add mysql
# chkconfig --level 345 mysql on
以上就是linux情況Mysql 5.7.13裝置教程的第一套計劃,願望對年夜家的進修有所贊助。
本文實例為年夜家分享了Linux mysql5.7.13裝置教程,供年夜家參考,詳細內容以下
1、預備
cmake-3.6.0.tar.gz
bison-3.0.4.tar.gz
mysql-5.7.13.tar.gz (http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13.tar.gz)
2、裝置cmake 和 bison
起首可以檢查下能否裝置了 cmake
# rpm -qa |grep cmake # tar zxvf cmake-3.6.0.tar.gz # cd cmake-3.6.0 # ./bootstrap # make && make install # tar zxvf bison-3.0.4.tar.gz # cd bison-3.0.4 # ./configure # make && make install
3、裝置Mysql
[root@localhost src]# tar -zxvf mysql-5.7.13.tar.gz [root@localhost src]# cd mysql-5.7.13 [root@localhost mysql-5.7.13]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/data/mysqldb -DMYSQL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 ... CMake Error at cmake/boost.cmake:81 (MESSAGE): You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory> This CMake script will look for boost in <directory>. If it is not there, it will download and unpack it (in that directory) for you. If you are inside a firewall, you may need to use an http proxy: export http_proxy=http://example.com:80 Call Stack (most recent call first): cmake/boost.cmake:238 (COULD_NOT_FIND_BOOST) CMakeLists.txt:451 (INCLUDE) -- Configuring incomplete, errors occurred!
注:從新運轉設置裝備擺設,須要刪除CMakeCache.txt文件
處理:
(1)在預編譯時添加響應的選項:cmake -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost
(2)或許下載一個boost包,放到/usr/local/boost目次下,然後在cmake前面加選項-DWITH_BOOST=/usr/local/boost
[root@localhost mysql-5.7.13]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/data/mysqldb -DMYSQL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost .... CMake Error at cmake/readline.cmake:64 (MESSAGE): Curses library not found. Please install appropriate package, 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:107 (FIND_CURSES) cmake/readline.cmake:181 (MYSQL_USE_BUNDLED_EDITLINE) CMakeLists.txt:479 (MYSQL_CHECK_EDITLINE) -- Configuring incomplete, errors occurred! See also "/usr/local/src/mysql-5.7.13/CMakeFiles/CMakeOutput.log". See also "/usr/local/src/mysql-5.7.13/CMakeFiles/CMakeError.log".
處理:
(1)裝置ncurses-devel
yum -y install ncurses-devel
(2)刪除CMakeCache.txt
rm CMakeCache.txt
(3)從新cmake
[root@localhost mysql-5.7.13]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=mysql.mysql -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/data/mysqldb -DMYSQL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost
[root@localhost mysql-5.7.13]# make[root@localhost mysql-5.7.13]# make install
出色專題分享:mysql分歧版本裝置教程 mysql5.7各版本裝置教程
以上就是本文的全體內容,願望對年夜家的進修有所贊助,也願望年夜家多多支撐。