Install MySQL5.6 on Linux

Source: Internet
Author: User
Tags crc32

OS & MySQL version and Configuration:

MySQL Version: 5.6.19
Linux Version: Linux boston.oracle.com 2.6.18-164. el5 #1 SMP Thu Sep 3 02:16:47 EDT 2009 i686 i686 i386 GNU/Linux

 

1. To DOWNLOAD the MySQL Installation Software, go to www.oracle.com to find database download. To DOWNLOAD MySQL, You need to register an account. The downloaded version is as follows:

After downloading, decompress the following eight files:

 

2. Install MySQL on Linux (one server program and one client program)

[Root @ vmoel5u4 mysql_installer] # ll
Total 115896
-Rw-r -- 1 root 22925106 May 8 2014 MySQL-client-advanced-5.6.19-1.rhel5.i386.rpm
-Rw-r -- 1 root 95621549 May 8 2014 MySQL-server-advanced-5.6.19-1.rhel5.i386.rpm

 

-- Install the Server:

[Root @ vmoel5u4 mysql_installer] # rpm-ivh MySQL-server-advanced-5.6.19-1.rhel5.i386.rpm
Preparing... ######################################## ### [100%]
1: mySQL-server-advanced ################################### ####### [1, 100%]
2012-11-18 00:34:49 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use -- explicit_defaults_for_timestamp server option (see documentation for more details ).
00:34:49 16251 [Note] InnoDB: Using mutexes to ref count buffer pool pages
00:34:49 16251 [Note] InnoDB: The InnoDB memory heap is disabled
00:34:49 16251 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
00:34:49 16251 [Note] InnoDB: Compressed tables use zlib 1.2.3
00:34:49 16251 [Note] InnoDB: Using Linux native AIO
00:34:49 16251 [Note] InnoDB: Not using CPU crc32 instructions
00:34:49 16251 [Note] InnoDB: Initializing buffer pool, size = 128.0 M
00:34:49 16251 [Note] InnoDB: Completed initialization of buffer pool
00:34:49 16251 [Note] InnoDB: The first specified data file./ibdata1 did not exist: a new database to be created!
00:34:49 16251 [Note] InnoDB: Setting file./ibdata1 size to 12 MB
00:34:49 16251 [Note] InnoDB: Database physically writes the file full: wait...
00:34:49 16251 [Note] InnoDB: Setting log file./ib_logfile101 size to 48 MB
00:34:50 16251 [Note] InnoDB: Setting log file./ib_logfile1 size to 48 MB
00:34:50 16251 [Note] InnoDB: Renaming log file./ib_logfile101 to./ib_logfile0
00:34:50 16251 [Warning] InnoDB: New log files created, LSN = 45781
00:34:50 16251 [Note] InnoDB: Doublewrite buffer not found: creating new
00:34:50 16251 [Note] InnoDB: Doublewrite buffer created
00:34:50 16251 [Note] InnoDB: 128 rollback segment (s) are active.
00:34:50 16251 [Warning] InnoDB: Creating foreign key constraint system tables.
00:34:50 16251 [Note] InnoDB: Foreign key constraint system tables created
00:34:50 16251 [Note] InnoDB: Creating tablespace and datafile system tables.
00:34:50 16251 [Note] InnoDB: Tablespace and datafile system tables created.
00:34:50 16251 [Note] InnoDB: Waiting for purge to start
00:34:50 16251 [Note] InnoDB: 5.6.19 started; log sequence number 0
00:34:50 16251 [Note] RSA private key file not found:/var/lib/mysql // private_key.pem. Some authentication plugins will not work.
00:34:50 16251 [Note] RSA public key file not found:/var/lib/mysql // public_key.pem. Some authentication plugins will not work.
A random root password has been set. You will find it in '/root/. mysql_secret '.
00:34:51 16251 [Note] Binlog end
00:34:51 16251 [Note] InnoDB: FTS optimize thread exiting.
00:34:51 16251 [Note] InnoDB: Starting shutdown...
00:34:53 16251 [Note] InnoDB: Shutdown completed; log sequence number 1625977


2012-11-18 00:34:53 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use -- explicit_defaults_for_timestamp server option (see documentation for more details ).
00:34:53 16282 [Note] InnoDB: Using mutexes to ref count buffer pool pages
00:34:53 16282 [Note] InnoDB: The InnoDB memory heap is disabled
00:34:53 16282 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
00:34:53 16282 [Note] InnoDB: Compressed tables use zlib 1.2.3
00:34:53 16282 [Note] InnoDB: Using Linux native AIO
00:34:53 16282 [Note] InnoDB: Not using CPU crc32 instructions
00:34:53 16282 [Note] InnoDB: Initializing buffer pool, size = 128.0 M
00:34:53 16282 [Note] InnoDB: Completed initialization of buffer pool
00:34:53 16282 [Note] InnoDB: Highest supported file format is Barracuda.
00:34:53 16282 [Note] InnoDB: 128 rollback segment (s) are active.
00:34:53 16282 [Note] InnoDB: Waiting for purge to start
00:34:53 16282 [Note] InnoDB: 5.6.19 started; log sequence number 1625977
00:34:53 16282 [Note] RSA private key file not found:/var/lib/mysql // private_key.pem. Some authentication plugins will not work.
00:34:53 16282 [Note] RSA public key file not found:/var/lib/mysql // public_key.pem. Some authentication plugins will not work.
00:34:53 16282 [Note] Binlog end
00:34:53 16282 [Note] InnoDB: FTS optimize thread exiting.
00:34:53 16282 [Note] InnoDB: Starting shutdown...
00:34:55 16282 [Note] InnoDB: Shutdown completed; log sequence number 1625987

 


A random password has been set for the MySQL root USER!
You will find that password in '/root/. mysql_secret '.

You must change that password on your first connect,
No other statement but 'set password' will be accepted.
See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

/Usr/bin/mysql_secure_installation

Which will also give you the option of removing the test database.
This is stronugly recommended for production servers.

/* The above red indicates the following:

A random secret is generated for the root user of the MySQL database. Please go to/root/. mysql_secret to find the password.

When you log on for the first time, you must change the password and the anonymous account has been deleted.

In addition, you can execute:

/Usr/bin/mysql_secure_installation

He can give you some options to remove the test database.

We strongly recommend that you perform this operation on the production server.

*/

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web

Http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as/usr/my. cnf and
Will be used by default by the server when you start it.
You may edit this file to change server settings

 

-- Install the Client:

[Root @ vmoel5u4 mysql_installer] # rpm-ivh MySQL-client-advanced-5.6.19-1.rhel5.i386.rpm
Preparing... ######################################## ### [100%]
1: mySQL-client-advanced ################################### ####### [1, 100%]


 

Iii. MySQL Database Configuration

1. Start the MySQL service.

[Root @ vmoel5u4 mysql_installer] # cd/etc/rc. d/init. d
[Root @ vmoel5u4 init. d] # service mysql start
Starting MySQL ...... [OK]

2. Modify the initial password of the root user of the MySQL database. First, check the initial password.

[Root @ vmoel5u4 mysql_installer] # vi/root/. mysql_secret
# The random password set for the root user at Sun Nov 18 00:34:51 2012 (local time): kX65UtYvovXN9VOV
The initial password can be: kX65UtYvovXN9VOV

 

[Root @ vmoel5u4 init. d] # mysql-uroot-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 15
Server version: 5.6.19-enterprise-commercial cial-advanced MySQL Enterprise Server-Advanced Edition (Commercial cial)

Copyright (c) 2000,201 4, 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>

/* Change the password to 123456 */

Mysql> update user set password = PASSWORD ('000000') where user = 'root ';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0

/* Refresh the permission table */

Mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

 

3. log on to MySQL with the new password 123456

[Root @ vmoel5u4 init. d] # mysql-uroot-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 16
Server version: 5.6.19-enterprise-commercial cial-advanced MySQL Enterprise Server-Advanced Edition (Commercial cial)

Copyright (c) 2000,201 4, 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-

Database changed
Mysql> select Host, User, Password from user;
+ ----------- + ------ + --------------------------------------------- +
| Host | User | Password |
+ ----------- + ------ + --------------------------------------------- +
| Localhost | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| 127.0.0.1 | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
|: 1 | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+ ----------- + ------ + --------------------------------------------- +
3 rows in set (0.00 sec)

4. Create a new test table and insert the test data.

Mysql> create table test (id int );
Query OK, 0 rows affected (0.05 sec)

Mysql> insert into test (id) values (1 );
Query OK, 1 row affected (0.05 sec)

Mysql> insert into test (id) values (2 );
Query OK, 1 row affected (0.01 sec)

Mysql> commit;
Query OK, 0 rows affected (0.00 sec)

Mysql> select * from test;
+ ------ +
| Id |
+ ------ +
| 1 |
| 2 |
+ ------ +
2 rows in set (0.02 sec)

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.