mysql安裝-----二進位制包安裝及解除安裝
1. 首先準備好二進位制安裝包
mysql-advanced-5.6.25-linux-glibc2.5-x86_64.tar.gz
2. 進行安裝
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /usr/local/mysql-advanced-5.6.25-linux-glibc2.5-x86_64.tar.gz
shell> ln -s /usr/local/mysql-advanced-5.6.25-linux-glibc2.5-x86_64.tar.gz /mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql --basedir=/mysql --datadir=/mysql/data
./mysql_install_db --basedir=/mysql --datadir=/mysql/data --user=mysql
Installing MySQL system tables...2015-06-10 11:20:08 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-06-10 11:20:08 0 [Note] /mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 4775 ...
2015-06-10 11:20:08 4775 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-06-10 11:20:08 4775 [Note] InnoDB: The InnoDB memory heap is disabled
2015-06-10 11:20:08 4775 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-06-10 11:20:08 4775 [Note] InnoDB: Memory barrier is not used
2015-06-10 11:20:08 4775 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-06-10 11:20:08 4775 [Note] InnoDB: Using Linux native AIO
2015-06-10 11:20:08 4775 [Note] InnoDB: Using CPU crc32 instructions
2015-06-10 11:20:08 4775 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-06-10 11:20:08 4775 [Note] InnoDB: Completed initialization of buffer pool
2015-06-10 11:20:08 4775 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-06-10 11:20:08 4775 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-06-10 11:20:08 4775 [Note] InnoDB: Database physically writes the file full: wait...
2015-06-10 11:20:08 4775 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-06-10 11:20:08 4775 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-06-10 11:20:08 4775 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-06-10 11:20:08 4775 [Warning] InnoDB: New log files created, LSN=45781
2015-06-10 11:20:08 4775 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-06-10 11:20:08 4775 [Note] InnoDB: Doublewrite buffer created
2015-06-10 11:20:08 4775 [Note] InnoDB: 128 rollback segment(s) are active.
2015-06-10 11:20:08 4775 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-06-10 11:20:08 4775 [Note] InnoDB: Foreign key constraint system tables created
2015-06-10 11:20:08 4775 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-06-10 11:20:08 4775 [Note] InnoDB: Tablespace and datafile system tables created.
2015-06-10 11:20:08 4775 [Note] InnoDB: Waiting for purge to start
2015-06-10 11:20:08 4775 [Note] InnoDB: 5.6.25 started; log sequence number 0
2015-06-10 11:20:08 4775 [Note] RSA private key file not found: /mysql/data//private_key.pem. Some authentication plugins will not work.
2015-06-10 11:20:08 4775 [Note] RSA public key file not found: /mysql/data//public_key.pem. Some authentication plugins will not work.
2015-06-10 11:20:08 4775 [Note] Binlog end
2015-06-10 11:20:08 4775 [Note] InnoDB: FTS optimize thread exiting.
2015-06-10 11:20:08 4775 [Note] InnoDB: Starting shutdown...
2015-06-10 11:20:10 4775 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2015-06-10 11:20:10 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-06-10 11:20:10 0 [Note] /mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 4798 ...
2015-06-10 11:20:10 4798 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-06-10 11:20:10 4798 [Note] InnoDB: The InnoDB memory heap is disabled
2015-06-10 11:20:10 4798 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-06-10 11:20:10 4798 [Note] InnoDB: Memory barrier is not used
2015-06-10 11:20:10 4798 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-06-10 11:20:10 4798 [Note] InnoDB: Using Linux native AIO
2015-06-10 11:20:10 4798 [Note] InnoDB: Using CPU crc32 instructions
2015-06-10 11:20:10 4798 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-06-10 11:20:10 4798 [Note] InnoDB: Completed initialization of buffer pool
2015-06-10 11:20:10 4798 [Note] InnoDB: Highest supported file format is Barracuda.
2015-06-10 11:20:10 4798 [Note] InnoDB: 128 rollback segment(s) are active.
2015-06-10 11:20:10 4798 [Note] InnoDB: Waiting for purge to start
2015-06-10 11:20:10 4798 [Note] InnoDB: 5.6.25 started; log sequence number 1625977
2015-06-10 11:20:10 4798 [Note] RSA private key file not found: /mysql/data//private_key.pem. Some authentication plugins will not work.
2015-06-10 11:20:10 4798 [Note] RSA public key file not found: /mysql/data//public_key.pem. Some authentication plugins will not work.
2015-06-10 11:20:10 4798 [Note] Binlog end
2015-06-10 11:20:10 4798 [Note] InnoDB: FTS optimize thread exiting.
2015-06-10 11:20:10 4798 [Note] InnoDB: Starting shutdown...
2015-06-10 11:20:12 4798 [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:
/mysql/bin/mysqladmin -u root password 'new-password'
/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/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 . ; /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
The latest information about MySQL is available on the web at
Support MySQL by buying support/licenses at
New default config file was created as /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
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server
設定root密碼
/mysql/bin/mysqladmin -u root password root123
[root@localhost ~]# mysql -uroot -proot123
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
[root@localhost ~]# mysqladmin shutdown -uroot -proot123
Warning: Using a password on the command line interface can be insecure.
150610 12:29:20 mysqld_safe mysqld from pid file /mysql/data/localhost.localdomain.pid ended
[1]+ Done bin/mysqld_safe --user=mysql (wd: /mysql)
(wd now: ~)
[root@localhost ~]# ps -ef|grep mysql
root 5378 2830 0 12:29 pts/1 00:00:00 grep mysql
mysql-advanced-5.6.25-linux-glibc2.5-x86_64.tar.gz
2. 進行安裝
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /usr/local/mysql-advanced-5.6.25-linux-glibc2.5-x86_64.tar.gz
shell> ln -s /usr/local/mysql-advanced-5.6.25-linux-glibc2.5-x86_64.tar.gz /mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql --basedir=/mysql --datadir=/mysql/data
./mysql_install_db --basedir=/mysql --datadir=/mysql/data --user=mysql
Installing MySQL system tables...2015-06-10 11:20:08 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-06-10 11:20:08 0 [Note] /mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 4775 ...
2015-06-10 11:20:08 4775 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-06-10 11:20:08 4775 [Note] InnoDB: The InnoDB memory heap is disabled
2015-06-10 11:20:08 4775 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-06-10 11:20:08 4775 [Note] InnoDB: Memory barrier is not used
2015-06-10 11:20:08 4775 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-06-10 11:20:08 4775 [Note] InnoDB: Using Linux native AIO
2015-06-10 11:20:08 4775 [Note] InnoDB: Using CPU crc32 instructions
2015-06-10 11:20:08 4775 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-06-10 11:20:08 4775 [Note] InnoDB: Completed initialization of buffer pool
2015-06-10 11:20:08 4775 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-06-10 11:20:08 4775 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-06-10 11:20:08 4775 [Note] InnoDB: Database physically writes the file full: wait...
2015-06-10 11:20:08 4775 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-06-10 11:20:08 4775 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-06-10 11:20:08 4775 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-06-10 11:20:08 4775 [Warning] InnoDB: New log files created, LSN=45781
2015-06-10 11:20:08 4775 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-06-10 11:20:08 4775 [Note] InnoDB: Doublewrite buffer created
2015-06-10 11:20:08 4775 [Note] InnoDB: 128 rollback segment(s) are active.
2015-06-10 11:20:08 4775 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-06-10 11:20:08 4775 [Note] InnoDB: Foreign key constraint system tables created
2015-06-10 11:20:08 4775 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-06-10 11:20:08 4775 [Note] InnoDB: Tablespace and datafile system tables created.
2015-06-10 11:20:08 4775 [Note] InnoDB: Waiting for purge to start
2015-06-10 11:20:08 4775 [Note] InnoDB: 5.6.25 started; log sequence number 0
2015-06-10 11:20:08 4775 [Note] RSA private key file not found: /mysql/data//private_key.pem. Some authentication plugins will not work.
2015-06-10 11:20:08 4775 [Note] RSA public key file not found: /mysql/data//public_key.pem. Some authentication plugins will not work.
2015-06-10 11:20:08 4775 [Note] Binlog end
2015-06-10 11:20:08 4775 [Note] InnoDB: FTS optimize thread exiting.
2015-06-10 11:20:08 4775 [Note] InnoDB: Starting shutdown...
2015-06-10 11:20:10 4775 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2015-06-10 11:20:10 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-06-10 11:20:10 0 [Note] /mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 4798 ...
2015-06-10 11:20:10 4798 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-06-10 11:20:10 4798 [Note] InnoDB: The InnoDB memory heap is disabled
2015-06-10 11:20:10 4798 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-06-10 11:20:10 4798 [Note] InnoDB: Memory barrier is not used
2015-06-10 11:20:10 4798 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-06-10 11:20:10 4798 [Note] InnoDB: Using Linux native AIO
2015-06-10 11:20:10 4798 [Note] InnoDB: Using CPU crc32 instructions
2015-06-10 11:20:10 4798 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-06-10 11:20:10 4798 [Note] InnoDB: Completed initialization of buffer pool
2015-06-10 11:20:10 4798 [Note] InnoDB: Highest supported file format is Barracuda.
2015-06-10 11:20:10 4798 [Note] InnoDB: 128 rollback segment(s) are active.
2015-06-10 11:20:10 4798 [Note] InnoDB: Waiting for purge to start
2015-06-10 11:20:10 4798 [Note] InnoDB: 5.6.25 started; log sequence number 1625977
2015-06-10 11:20:10 4798 [Note] RSA private key file not found: /mysql/data//private_key.pem. Some authentication plugins will not work.
2015-06-10 11:20:10 4798 [Note] RSA public key file not found: /mysql/data//public_key.pem. Some authentication plugins will not work.
2015-06-10 11:20:10 4798 [Note] Binlog end
2015-06-10 11:20:10 4798 [Note] InnoDB: FTS optimize thread exiting.
2015-06-10 11:20:10 4798 [Note] InnoDB: Starting shutdown...
2015-06-10 11:20:12 4798 [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:
/mysql/bin/mysqladmin -u root password 'new-password'
/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/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 . ; /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
The latest information about MySQL is available on the web at
Support MySQL by buying support/licenses at
New default config file was created as /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
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server
設定root密碼
/mysql/bin/mysqladmin -u root password root123
[root@localhost ~]# mysql -uroot -proot123
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
[root@localhost ~]# mysqladmin shutdown -uroot -proot123
Warning: Using a password on the command line interface can be insecure.
150610 12:29:20 mysqld_safe mysqld from pid file /mysql/data/localhost.localdomain.pid ended
[1]+ Done bin/mysqld_safe --user=mysql (wd: /mysql)
(wd now: ~)
[root@localhost ~]# ps -ef|grep mysql
root 5378 2830 0 12:29 pts/1 00:00:00 grep mysql
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22039464/viewspace-1731503/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Mysql二進位制包安裝MySql
- MySQL 安裝指南 二進位制安裝MySql
- mysql安裝------RPM包安裝及解除安裝MySql
- 使用二進位制包來安裝MySQLMySql
- Linux下解除安裝MySQL二進位制包(tar.gz)LinuxMySql
- Mysql for Linux安裝配置之——二進位制安裝MySqlLinux
- MySQL 5.7 原始碼安裝、Yum倉庫安裝、RPM安裝、二進位制安裝MySql原始碼
- MySQL linux二進位制安裝MySqlLinux
- mysql5.7 for windows二進位制安裝及配置MySqlWindows
- 二進位制檔案安裝安裝etcd
- Ubuntu24 二進位制包安裝mysql5.7UbuntuMySql
- centos 7 二進位制安裝mysql 5.7.25CentOSMySql
- ubuntu mysql5.6二進位制安裝UbuntuMySql
- MySQL5.7 windows二進位制安裝MySqlWindows
- 二進位制方式安裝mysql 5.6.15MySql
- 【Linux合集】二進位制安裝mysqlLinuxMySql
- 03二進位制包安裝與介紹
- mysql二進位制包安裝與配置實戰記錄MySql
- solaris mysql 安裝 解除安裝MySql
- docker安裝及解除安裝Docker
- PostgreSQL二進位制安裝流程SQL
- 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
- CentOS6.6安裝二進位制壓縮包mysql5.6CentOSMySql
- Linux安裝解除安裝MySQLLinuxMySql
- CentOS7 安裝 MySQL8.0(二進位制)CentOSMySql
- Percona MySQL 5.7 Linux通用二進位制包安裝(CentOS 6.5)MySqlLinuxCentOS
- Percona MySQL 5.5 Linux通用二進位制包安裝(CentOS 6.9)MySqlLinuxCentOS
- Mysql安裝解除安裝與啟停MySql
- Linux下安裝、解除安裝mysqlLinuxMySql
- mysql非安裝包安裝教程MySql
- PostgreSQL 10.23 二進位制安裝SQL
- centos7搭建lnmp安裝二進位制mysql【三】CentOSLNMPMySql
- Windows11二進位制方式安裝MySQL5.7.44WindowsMySql
- rpm包安裝升級與解除安裝