二進位制方式安裝mysql 5.6.15
1 環境介紹
作業系統:Red Hat Enterprise Linux Server release 5.6 (64位)
2 安裝軟體
二進位制包:mysql-5.6.15-linux-glibc2.5-x86_64.tar.gz
Mysql 下載地址:http://dev.mysql.com/downloads/
3 安裝步驟
3.1 建立使用者
[root@laodeng5 /]# groupadd mysql
[root@laodeng5 /]# useradd -m -r -g mysql mysql
3.2 建立目錄
[root@laodeng5 /]# mkdir /opt
3.3 解壓
[root@laodeng5 /]# cd /opt
[root@laodeng5 opt]# tar -xzvf /software/mysql-5.6.15-linux-glibc2.5-x86_64.tar.gz
[root@laodeng5 opt]# rename mysql-5.6.15-linux-glibc2.5-x86_64 to mysql
[root@laodeng5 opt]# cd mysql
[root@laodeng5 mysql]# chown -R mysql .
[root@laodeng5 mysql]# chgrp -R mysql .
3.4 安裝資料庫
[root@laodeng5 mysql]# scripts/mysql_install_db --user=mysql --user=mysql --basedir=/opt/mysql/ --datadir=/opt/mysql/data/
Installing MySQL system tables...2014-01-27 11:00:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-01-27 11:00:24 26220 [Note] InnoDB: The InnoDB memory heap is disabled
2014-01-27 11:00:24 26220 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-01-27 11:00:24 26220 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-01-27 11:00:24 26220 [Note] InnoDB: Using Linux native AIO
2014-01-27 11:00:24 26220 [Note] InnoDB: Using CPU crc32 instructions
2014-01-27 11:00:24 26220 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-01-27 11:00:24 26220 [Note] InnoDB: Completed initialization of buffer pool
2014-01-27 11:00:24 26220 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2014-01-27 11:00:24 26220 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2014-01-27 11:00:24 26220 [Note] InnoDB: Database physically writes the file full: wait...
2014-01-27 11:00:24 26220 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2014-01-27 11:00:25 26220 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2014-01-27 11:00:25 26220 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2014-01-27 11:00:25 26220 [Warning] InnoDB: New log files created, LSN=45781
2014-01-27 11:00:25 26220 [Note] InnoDB: Doublewrite buffer not found: creating new
2014-01-27 11:00:25 26220 [Note] InnoDB: Doublewrite buffer created
2014-01-27 11:00:25 26220 [Note] InnoDB: 128 rollback segment(s) are active.
2014-01-27 11:00:26 26220 [Warning] InnoDB: Creating foreign key constraint system tables.
2014-01-27 11:00:26 26220 [Note] InnoDB: Foreign key constraint system tables created
2014-01-27 11:00:26 26220 [Note] InnoDB: Creating tablespace and datafile system tables.
2014-01-27 11:00:26 26220 [Note] InnoDB: Tablespace and datafile system tables created.
2014-01-27 11:00:26 26220 [Note] InnoDB: Waiting for purge to start
2014-01-27 11:00:26 26220 [Note] InnoDB: 5.6.15 started; log sequence number 0
2014-01-27 11:00:26 26220 [Note] Binlog end
2014-01-27 11:00:26 26220 [Note] InnoDB: FTS optimize thread exiting.
2014-01-27 11:00:26 26220 [Note] InnoDB: Starting shutdown...
2014-01-27 11:00:28 26220 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2014-01-27 11:00:28 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-01-27 11:00:28 26243 [Note] InnoDB: The InnoDB memory heap is disabled
2014-01-27 11:00:28 26243 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-01-27 11:00:28 26243 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-01-27 11:00:28 26243 [Note] InnoDB: Using Linux native AIO
2014-01-27 11:00:28 26243 [Note] InnoDB: Using CPU crc32 instructions
2014-01-27 11:00:28 26243 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-01-27 11:00:28 26243 [Note] InnoDB: Completed initialization of buffer pool
2014-01-27 11:00:28 26243 [Note] InnoDB: Highest supported file format is Barracuda.
2014-01-27 11:00:28 26243 [Note] InnoDB: 128 rollback segment(s) are active.
2014-01-27 11:00:28 26243 [Note] InnoDB: Waiting for purge to start
2014-01-27 11:00:28 26243 [Note] InnoDB: 5.6.15 started; log sequence number 1625977
2014-01-27 11:00:28 26243 [Note] Binlog end
2014-01-27 11:00:28 26243 [Note] InnoDB: FTS optimize thread exiting.
2014-01-27 11:00:28 26243 [Note] InnoDB: Starting shutdown...
2014-01-27 11:00:29 26243 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/opt/mysql//bin/mysqladmin -u root password 'new-password'
/opt/mysql//bin/mysqladmin -u root -h laodeng5.localdomain password 'new-password'
Alternatively you can run:
/opt/mysql//bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; /opt/mysql//bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as /opt/mysql//my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
[root@laodeng5 mysql]# chown -R root .
[root@laodeng5 mysql]# chown -R mysql data
3.5 配置資料庫
[root@laodeng5 mysql]# mkdir etc
[root@laodeng5 mysql]# mkdir log
[root@laodeng5 mysql]# chown mysql log
[root@laodeng5 mysql]# cp support-files/mysql.server /etc/init.d/
修改密碼:
[root@laodeng5 mysql]# bin/mysqladmin -u root password 'mysql'
為了能夠service mysql.server start的方式啟動mysql,進行如下配置:
方法一:
[root@laodeng5 mysql]# ln –s /opt/mysql /usr/local/mysql
[root@laodeng5 mysql]# cp support-files/my-default.cnf etc/my.cnf
方法二:
[root@laodeng5 mysql]# cd /ect/init.d
[root@laodeng5 init.d]# vi mysql.server
修改:
basedir=
datadir=
為
basedir=/opt/mysql
datadir=/opt/mysql/data
[root@laodeng5 init.d]# cd /opt/mysql
[root@laodeng5 mysql]# cp support-files/my-default.cnf /etc/my.cnf
注意:兩種方法的my.cnf位置不同。
可以使用如下命令檢視mysql搜尋my.cnf配置檔案的順序:
[root@laodeng5 mysql]# bin/mysqld --help --verbose --skip-networking --pid-file=$(tempfile) 2> /dev/null | grep -A1 'Default options are read'
-bash: tempfile: command not found
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/195110/viewspace-1075931/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL 安裝指南 二進位制安裝MySql
- Mysql二進位制包安裝MySql
- Windows11二進位制方式安裝MySQL5.7.44WindowsMySql
- 原始碼方式安裝mysql 5.6.15原始碼MySql
- MySQL linux二進位制安裝MySqlLinux
- CentOS安裝使用二進位制方式mysql5.6筆記CentOSMySql筆記
- mysql安裝-----二進位制包安裝及解除安裝MySql
- 二進位制方式安裝 k8sK8S
- centos7二進位制方式安裝rabbitmqCentOSMQ
- centos 7 二進位制安裝mysql 5.7.25CentOSMySql
- 使用二進位制包來安裝MySQLMySql
- ubuntu mysql5.6二進位制安裝UbuntuMySql
- MySQL5.7 windows二進位制安裝MySqlWindows
- Mysql for Linux安裝配置之——二進位制安裝MySqlLinux
- RHEL 7.2 安裝二進位制MySQL 5.7.18MySql
- yum安裝nginx-php-mysql二進位制NginxPHPMySql
- MySQL5.7 linux二進位制安裝MySqlLinux
- (OEL 6.3) Mysql6.5二進位制安裝MySql
- Ubuntu 24.04 二進位制安裝 MySQL 8.0.20UbuntuMySql
- CentOS7 安裝 MySQL8.0(二進位制)CentOSMySql
- mysql5.7 for windows二進位制安裝及配置MySqlWindows
- PostgreSQL二進位制安裝流程SQL
- centos7搭建lnmp安裝二進位制mysql【三】CentOSLNMPMySql
- Ubuntu24 二進位制包安裝mysql5.7UbuntuMySql
- 二進位制檔案安裝安裝etcd
- MySQL 5.7 原始碼安裝、Yum倉庫安裝、RPM安裝、二進位制安裝MySql原始碼
- 主從安裝mysql 5.6.15MySql
- CentOS6.5二進位制檔案安裝MySQL5.6.39CentOSMySql
- mysql二進位制包安裝與配置實戰記錄MySql
- PostgreSQL 10.23 二進位制安裝SQL
- 基於Linux的MySQL5.7的二進位制安裝LinuxMySql
- CentOS6.6安裝二進位制壓縮包mysql5.6CentOSMySql
- Linux下解除安裝MySQL二進位制包(tar.gz)LinuxMySql
- 安裝編譯好的二進位制mysql並更改路徑編譯MySql
- MySQL二進位制日誌MySql
- mysql 二進位制日誌MySql
- python+ mysql儲存二進位制流的方式PythonMySql
- 03二進位制包安裝與介紹