mysql-advanced-5.6.25-linux-glibc2.5-i686.tar.gz安裝
1.建立安裝目錄/u01
[root@mbsdb install]# mkdir /u01/
[root@mbsdb install]# ls -ltr
total 1598060
-rwxr--r-- 1 root root 984729600 May 5 12:21 mysql-advanced-5.6.25-linux-glibc2.5-i686.tar
-rw-r--r-- 1 root root 15602 May 28 19:30 README.txt
-rwxr--r-- 1 root root 328125558 Jun 24 23:15 V76363-01.zip
-rwxr--r-- 1 root root 321917929 Jun 25 04:39 V76362-01.zip
drwxr-xr-x 13 root root 4096 Aug 18 22:35 mysql-advanced-5.6.25-linux-glibc2.5-i686
[root@mbsdb install]# cd mysql-advanced-5.6.25-linux-glibc2.5-i686
2.修改目錄許可權為mysql:mysql
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# chown -R mysql:mysql .
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# ls -ld .
drwxr-xr-x 13 mysql mysql 4096 Aug 18 22:35 .
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# cd ..
3.將源目錄mv到/u01下並重新命名為mysql
[root@mbsdb install]# mv mysql-advanced-5.6.25-linux-glibc2.5-i686 /u01/mysql
4.執行mysql_install_db指令碼,安裝配置資料庫
[root@mbsdb install]# cd /u01
[root@mbsdb u01]# ls -ltr
total 4
drwxr-xr-x 13 mysql mysql 4096 Aug 18 22:35 mysql
[root@mbsdb u01]# cd mysql/
[root@mbsdb mysql]# ls
bin docs INSTALL-BINARY LICENSE.mysql mysql-test scripts sql-bench
data include lib man README share support-files
[root@mbsdb mysql]# cd scripts/
[root@mbsdb scripts]# ls
mysql_install_db
[root@mbsdb scripts]# ./mysql_install_db --user=mysql --basedir=/u01/mysql --datadir=/u01/mysql/data
Installing MySQL system tables...2015-08-26 06:15:54 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-26 06:15:54 0 [Note] /u01/mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 2581 ...
2015-08-26 06:15:55 2581 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-08-26 06:15:55 2581 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-26 06:15:55 2581 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2015-08-26 06:15:55 2581 [Note] InnoDB: Memory barrier is not used
2015-08-26 06:15:55 2581 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-26 06:15:55 2581 [Note] InnoDB: Using Linux native AIO
2015-08-26 06:15:55 2581 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-26 06:15:55 2581 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-26 06:15:55 2581 [Note] InnoDB: Completed initialization of buffer pool
2015-08-26 06:15:55 2581 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-08-26 06:15:55 2581 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-08-26 06:15:55 2581 [Note] InnoDB: Database physically writes the file full: wait...
2015-08-26 06:15:55 2581 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-08-26 06:15:57 2581 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-08-26 06:15:59 2581 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-08-26 06:15:59 2581 [Warning] InnoDB: New log files created, LSN=45781
2015-08-26 06:15:59 2581 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-08-26 06:15:59 2581 [Note] InnoDB: Doublewrite buffer created
2015-08-26 06:15:59 2581 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-26 06:15:59 2581 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-08-26 06:15:59 2581 [Note] InnoDB: Foreign key constraint system tables created
2015-08-26 06:15:59 2581 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-08-26 06:15:59 2581 [Note] InnoDB: Tablespace and datafile system tables created.
2015-08-26 06:15:59 2581 [Note] InnoDB: Waiting for purge to start
2015-08-26 06:15:59 2581 [Note] InnoDB: 5.6.25 started; log sequence number 0
2015-08-26 06:15:59 2581 [Note] RSA private key file not found: /u01/mysql/data//private_key.pem. Some authentication plugins will not work.
2015-08-26 06:15:59 2581 [Note] RSA public key file not found: /u01/mysql/data//public_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:00 2581 [Note] Binlog end
2015-08-26 06:16:00 2581 [Note] InnoDB: FTS optimize thread exiting.
2015-08-26 06:16:00 2581 [Note] InnoDB: Starting shutdown...
2015-08-26 06:16:02 2581 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2015-08-26 06:16:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-26 06:16:02 0 [Note] /u01/mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 2604 ...
2015-08-26 06:16:02 2604 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-08-26 06:16:02 2604 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-26 06:16:02 2604 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2015-08-26 06:16:02 2604 [Note] InnoDB: Memory barrier is not used
2015-08-26 06:16:02 2604 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-26 06:16:02 2604 [Note] InnoDB: Using Linux native AIO
2015-08-26 06:16:02 2604 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-26 06:16:02 2604 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-26 06:16:03 2604 [Note] InnoDB: Completed initialization of buffer pool
2015-08-26 06:16:03 2604 [Note] InnoDB: Highest supported file format is Barracuda.
2015-08-26 06:16:03 2604 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-26 06:16:03 2604 [Note] InnoDB: Waiting for purge to start
2015-08-26 06:16:03 2604 [Note] InnoDB: 5.6.25 started; log sequence number 1625977
2015-08-26 06:16:03 2604 [Note] RSA private key file not found: /u01/mysql/data//private_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:03 2604 [Note] RSA public key file not found: /u01/mysql/data//public_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:04 2604 [Note] Binlog end
2015-08-26 06:16:04 2604 [Note] InnoDB: FTS optimize thread exiting.
2015-08-26 06:16:04 2604 [Note] InnoDB: Starting shutdown...
2015-08-26 06:16:05 2604 [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:
/u01/mysql/bin/mysqladmin -u root password 'new-password'
/u01/mysql/bin/mysqladmin -u root -h mbsdb password 'new-password'
Alternatively you can run:
/u01/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 . ; /u01/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 at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as /u01/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
5.將mysql.server拷貝到/etc/rc.d/init.d下,並重新命名為mysqld
[root@mbsdb scripts]# cd ../support-files/
[root@mbsdb support-files]# cp mysql.server /etc/rc.d/init.d/mysqld
[root@mbsdb support-files]# /etc/init.d/mysqld start
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
/etc/init.d/mysqld: line 276: cd: /usr/local/mysql: No such file or directory
Starting MySQLCouldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)[FAILED]
啟動失敗,修改mysqld指令碼,設定basedir和datadir分別為/u01/mysql和/u01/mysql/data
basedir=/u01/mysql
datadir=/u01/mysql/data
重新啟動mysql,啟動成功
[root@mbsdb support-files]# /etc/init.d/mysqld start
Starting MySQL.......[ OK ]
[root@mbsdb support-files]# mysql
-bash: mysql: command not found
修改.bash_profile中path,增加/u01/mysql/bin
PATH=$PATH:$HOME/bin:/u01/mysql/bin
[root@mbsdb ~]# source .bash_profile
[root@mbsdb ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.25-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
[root@mbsdb install]# mkdir /u01/
[root@mbsdb install]# ls -ltr
total 1598060
-rwxr--r-- 1 root root 984729600 May 5 12:21 mysql-advanced-5.6.25-linux-glibc2.5-i686.tar
-rw-r--r-- 1 root root 15602 May 28 19:30 README.txt
-rwxr--r-- 1 root root 328125558 Jun 24 23:15 V76363-01.zip
-rwxr--r-- 1 root root 321917929 Jun 25 04:39 V76362-01.zip
drwxr-xr-x 13 root root 4096 Aug 18 22:35 mysql-advanced-5.6.25-linux-glibc2.5-i686
[root@mbsdb install]# cd mysql-advanced-5.6.25-linux-glibc2.5-i686
2.修改目錄許可權為mysql:mysql
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# chown -R mysql:mysql .
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# ls -ld .
drwxr-xr-x 13 mysql mysql 4096 Aug 18 22:35 .
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# cd ..
3.將源目錄mv到/u01下並重新命名為mysql
[root@mbsdb install]# mv mysql-advanced-5.6.25-linux-glibc2.5-i686 /u01/mysql
4.執行mysql_install_db指令碼,安裝配置資料庫
[root@mbsdb install]# cd /u01
[root@mbsdb u01]# ls -ltr
total 4
drwxr-xr-x 13 mysql mysql 4096 Aug 18 22:35 mysql
[root@mbsdb u01]# cd mysql/
[root@mbsdb mysql]# ls
bin docs INSTALL-BINARY LICENSE.mysql mysql-test scripts sql-bench
data include lib man README share support-files
[root@mbsdb mysql]# cd scripts/
[root@mbsdb scripts]# ls
mysql_install_db
[root@mbsdb scripts]# ./mysql_install_db --user=mysql --basedir=/u01/mysql --datadir=/u01/mysql/data
Installing MySQL system tables...2015-08-26 06:15:54 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-26 06:15:54 0 [Note] /u01/mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 2581 ...
2015-08-26 06:15:55 2581 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-08-26 06:15:55 2581 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-26 06:15:55 2581 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2015-08-26 06:15:55 2581 [Note] InnoDB: Memory barrier is not used
2015-08-26 06:15:55 2581 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-26 06:15:55 2581 [Note] InnoDB: Using Linux native AIO
2015-08-26 06:15:55 2581 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-26 06:15:55 2581 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-26 06:15:55 2581 [Note] InnoDB: Completed initialization of buffer pool
2015-08-26 06:15:55 2581 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-08-26 06:15:55 2581 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-08-26 06:15:55 2581 [Note] InnoDB: Database physically writes the file full: wait...
2015-08-26 06:15:55 2581 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-08-26 06:15:57 2581 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-08-26 06:15:59 2581 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-08-26 06:15:59 2581 [Warning] InnoDB: New log files created, LSN=45781
2015-08-26 06:15:59 2581 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-08-26 06:15:59 2581 [Note] InnoDB: Doublewrite buffer created
2015-08-26 06:15:59 2581 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-26 06:15:59 2581 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-08-26 06:15:59 2581 [Note] InnoDB: Foreign key constraint system tables created
2015-08-26 06:15:59 2581 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-08-26 06:15:59 2581 [Note] InnoDB: Tablespace and datafile system tables created.
2015-08-26 06:15:59 2581 [Note] InnoDB: Waiting for purge to start
2015-08-26 06:15:59 2581 [Note] InnoDB: 5.6.25 started; log sequence number 0
2015-08-26 06:15:59 2581 [Note] RSA private key file not found: /u01/mysql/data//private_key.pem. Some authentication plugins will not work.
2015-08-26 06:15:59 2581 [Note] RSA public key file not found: /u01/mysql/data//public_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:00 2581 [Note] Binlog end
2015-08-26 06:16:00 2581 [Note] InnoDB: FTS optimize thread exiting.
2015-08-26 06:16:00 2581 [Note] InnoDB: Starting shutdown...
2015-08-26 06:16:02 2581 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2015-08-26 06:16:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-26 06:16:02 0 [Note] /u01/mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 2604 ...
2015-08-26 06:16:02 2604 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-08-26 06:16:02 2604 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-26 06:16:02 2604 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2015-08-26 06:16:02 2604 [Note] InnoDB: Memory barrier is not used
2015-08-26 06:16:02 2604 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-26 06:16:02 2604 [Note] InnoDB: Using Linux native AIO
2015-08-26 06:16:02 2604 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-26 06:16:02 2604 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-26 06:16:03 2604 [Note] InnoDB: Completed initialization of buffer pool
2015-08-26 06:16:03 2604 [Note] InnoDB: Highest supported file format is Barracuda.
2015-08-26 06:16:03 2604 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-26 06:16:03 2604 [Note] InnoDB: Waiting for purge to start
2015-08-26 06:16:03 2604 [Note] InnoDB: 5.6.25 started; log sequence number 1625977
2015-08-26 06:16:03 2604 [Note] RSA private key file not found: /u01/mysql/data//private_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:03 2604 [Note] RSA public key file not found: /u01/mysql/data//public_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:04 2604 [Note] Binlog end
2015-08-26 06:16:04 2604 [Note] InnoDB: FTS optimize thread exiting.
2015-08-26 06:16:04 2604 [Note] InnoDB: Starting shutdown...
2015-08-26 06:16:05 2604 [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:
/u01/mysql/bin/mysqladmin -u root password 'new-password'
/u01/mysql/bin/mysqladmin -u root -h mbsdb password 'new-password'
Alternatively you can run:
/u01/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 . ; /u01/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 at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as /u01/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
5.將mysql.server拷貝到/etc/rc.d/init.d下,並重新命名為mysqld
[root@mbsdb scripts]# cd ../support-files/
[root@mbsdb support-files]# cp mysql.server /etc/rc.d/init.d/mysqld
[root@mbsdb support-files]# /etc/init.d/mysqld start
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
/etc/init.d/mysqld: line 276: cd: /usr/local/mysql: No such file or directory
Starting MySQLCouldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)[FAILED]
啟動失敗,修改mysqld指令碼,設定basedir和datadir分別為/u01/mysql和/u01/mysql/data
basedir=/u01/mysql
datadir=/u01/mysql/data
重新啟動mysql,啟動成功
[root@mbsdb support-files]# /etc/init.d/mysqld start
Starting MySQL.......[ OK ]
[root@mbsdb support-files]# mysql
-bash: mysql: command not found
修改.bash_profile中path,增加/u01/mysql/bin
PATH=$PATH:$HOME/bin:/u01/mysql/bin
[root@mbsdb ~]# source .bash_profile
[root@mbsdb ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.25-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10972173/viewspace-1783409/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- codis安裝 (java 安裝 + zookeeper 安裝 + go 安裝 + codis 安裝JavaGo
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- mysql安裝 (yum 安裝)MySql
- MMM安裝、MHA安裝
- mysql安裝------RPM包安裝及解除安裝MySql
- oracle安裝:OUI安裝Oracle(圖形介面安裝)OracleUI
- ffmpeg安裝之mac安裝Mac
- docker安裝及解除安裝Docker
- 02 安裝git、安裝TortoiseGitGit
- Ubuntu解除安裝和安裝Ubuntu
- Orace RAC安裝-DNS安裝DNS
- caffe安裝系列——安裝OpenCVOpenCV
- SPARK 安裝之scala 安裝Spark
- mac 安裝opencv homebrew安裝MacOpenCV
- Oracle 安裝與解除安裝Oracle
- solaris mysql 安裝 解除安裝MySql
- BiocManager安裝,devtools安裝dev
- JDK安裝和解除安裝JDK
- 安裝HomeBrew提示已安裝並無法解除安裝
- SQL Server 2012 安裝——安裝 OR 解除安裝SQLServer
- win10安裝版怎麼安裝_安裝版win10安裝教程Win10
- mysql安裝-----二進位制包安裝及解除安裝MySql
- cocoapods安裝/解除安裝/使用
- Mac Redis安裝與解除安裝MacRedis
- [ 安裝 ] Zeppelin安裝步驟!
- Ubuntu安裝和解除安裝mongodbUbuntuMongoDB
- linux 安裝yum 安裝phpLinuxPHP
- [雲原生]Docker - 安裝&解除安裝Docker
- JDK的安裝與解除安裝JDK
- selenium 安裝與 chromedriver安裝Chrome
- ORACLE TEXT安裝與解除安裝Oracle
- Centos 安裝yum,安裝ansibleCentOS
- zabbix安裝—–nginx安裝和配置Nginx
- LAMP原始碼安裝+wordpress安裝LAMP原始碼
- mysql非安裝包安裝教程MySql
- kratos安裝及依賴安裝
- Linux安裝解除安裝MySQLLinuxMySql
- MySQL 5.7 原始碼安裝、Yum倉庫安裝、RPM安裝、二進位制安裝MySql原始碼