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 i686 i686 i386 gnu/linux
One, download the MySQL installation software, please go to www.oracle.com to find the database DOWNLOAD, download mysql need to register an account. I downloaded the following version:
After download, unzip is the following 8 files:
Two, install MySQL on Linux (a server program and a client program)
[email protected] mysql_installer]# LL
Total 115896
-rw-r--r--1 root root 22925106 May 8 mysql-client-advanced-5.6.19-1.rhel5.i386.rpm
-rw-r--r--1 root root 95621549 May 8 mysql-server-advanced-5.6.19-1.rhel5.i386.rpm
--Install server side:
[Email protected] mysql_installer]# RPM-IVH mysql-server-advanced-5.6.19-1.rhel5.i386.rpm
Preparing ... ########################################### [100%]
1:mysql-server-advanced ########################################### [100%]
2012-11-18 00:34:49 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).
2012-11-18 00:34:49 16251 [Note] innodb:using mutexes to ref count buffer pool pages
2012-11-18 00:34:49 16251 [Note] innodb:the InnoDB memory heap is disabled
2012-11-18 00:34:49 16251 [Note] innodb:mutexes and rw_locks use InnoDB ' s own implementation
2012-11-18 00:34:49 16251 [Note] innodb:compressed tables use zlib 1.2.3
2012-11-18 00:34:49 16251 [Note] innodb:using Linux native AIO
2012-11-18 00:34:49 16251 [Note] innodb:not using CPU CRC32 instructions
2012-11-18 00:34:49 16251 [Note] innodb:initializing buffer pool, size = 128.0M
2012-11-18 00:34:49 16251 [Note] innodb:completed initialization of buffer pool
2012-11-18 00:34:49 16251 [Note] innodb:the first specified data file./ibdata1 did not exist:a new database to be creat ed!
2012-11-18 00:34:49 16251 [Note] innodb:setting file./ibdata1 size to MB
2012-11-18 00:34:49 16251 [Note] Innodb:database physically writes the file full:wait ...
2012-11-18 00:34:49 16251 [Note] innodb:setting log file./ib_logfile101 size to + MB
2012-11-18 00:34:50 16251 [Note] innodb:setting log file./ib_logfile1 size to + MB
2012-11-18 00:34:50 16251 [Note] innodb:renaming log file./ib_logfile101 to./ib_logfile0
2012-11-18 00:34:50 16251 [Warning] innodb:new log files created, lsn=45781
2012-11-18 00:34:50 16251 [Note] innodb:doublewrite buffer not found:creating new
2012-11-18 00:34:50 16251 [Note] Innodb:doublewrite buffer created
2012-11-18 00:34:50 16251 [Note] innodb:128 rollback segment (s) is active.
2012-11-18 00:34:50 16251 [Warning] innodb:creating FOREIGN KEY constraint system tables.
2012-11-18 00:34:50 16251 [Note] innodb:foreign key constraint system tables created
2012-11-18 00:34:50 16251 [Note] innodb:creating tablespace and datafile system tables.
2012-11-18 00:34:50 16251 [Note] innodb:tablespace and datafile system tables created.
2012-11-18 00:34:50 16251 [Note] innodb:waiting for purge to start
2012-11-18 00:34:50 16251 [Note] innodb:5.6.19 started; Log sequence number 0
2012-11-18 00:34:50 16251 [Note] RSA private key file not found:/var/lib/mysql//private_key.pem. Some authentication plugins won't work.
2012-11-18 00:34:50 16251 [Note] RSA public key file not found:/var/lib/mysql//public_key.pem. Some authentication plugins won't work.
A random root password has been set. You'll find it in '/root/.mysql_secret '.
2012-11-18 00:34:51 16251 [Note] Binlog End
2012-11-18 00:34:51 16251 [Note] innodb:fts optimize thread exiting.
2012-11-18 00:34:51 16251 [Note] innodb:starting shutdown ...
2012-11-18 00:34:53 16251 [Note] Innodb:shutdown completed; Log sequence Number 1625977
2012-11-18 00:34:53 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).
2012-11-18 00:34:53 16282 [Note] innodb:using mutexes to ref count buffer pool pages
2012-11-18 00:34:53 16282 [Note] innodb:the InnoDB memory heap is disabled
2012-11-18 00:34:53 16282 [Note] innodb:mutexes and rw_locks use InnoDB ' s own implementation
2012-11-18 00:34:53 16282 [Note] innodb:compressed tables use zlib 1.2.3
2012-11-18 00:34:53 16282 [Note] innodb:using Linux native AIO
2012-11-18 00:34:53 16282 [Note] innodb:not using CPU CRC32 instructions
2012-11-18 00:34:53 16282 [Note] innodb:initializing buffer pool, size = 128.0M
2012-11-18 00:34:53 16282 [Note] innodb:completed initialization of buffer pool
2012-11-18 00:34:53 16282 [Note] innodb:highest supported file format is Barracuda.
2012-11-18 00:34:53 16282 [Note] innodb:128 rollback segment (s) is active.
2012-11-18 00:34:53 16282 [Note] innodb:waiting for purge to start
2012-11-18 00:34:53 16282 [Note] innodb:5.6.19 started; Log sequence Number 1625977
2012-11-18 00:34:53 16282 [Note] RSA private key file not found:/var/lib/mysql//private_key.pem. Some authentication plugins won't work.
2012-11-18 00:34:53 16282 [Note] RSA public key file not found:/var/lib/mysql//public_key.pem. Some authentication plugins won't work.
2012-11-18 00:34:53 16282 [Note] Binlog End
2012-11-18 00:34:53 16282 [Note] innodb:fts optimize thread exiting.
2012-11-18 00:34:53 16282 [Note] innodb:starting shutdown ...
2012-11-18 00:34:55 16282 [Note] Innodb:shutdown completed; Log sequence Number 1625987
A RANDOM PASSWORD have BEEN SET for the MySQL root USER!
You'll find that password in '/root/.mysql_secret '.
You must change this password on your first connect,
No other statement but ' SET PASSWORD ' would be accepted.
See the Manual for the semantics of the ' password expired ' flag.
Also, the anonymous user has been removed.
In addition, you can run:
/usr/bin/mysql_secure_installation
Which would also give you the option of removing the test database.
This is the strongly recommended for production servers.
*/* The above-mentioned red probably means the following:
A random secret was generated for the root user of the MySQL database, please go to/root/.mysql_secret to find the password.
When you first log in you must change the password, and the anonymous account has been deleted.
In addition, you can perform:
/usr/bin/mysql_secure_installation
He can give you some options for removing the test database.
It is highly recommended to do this on the production server.
*/
See the Manual for more instructions.
problems at http://bugs.mysql.com/
The latest information about MySQL was available on the Web at
http://www.mysql.com
Support for MySQL by buying support/licenses at http://shop.mysql.com
New Default Config file was created as/usr/my.cnf and
Would be used by default by the server when you start it.
You could edit this file to the Change server settings
--Install client side:
[Email protected] mysql_installer]# RPM-IVH mysql-client-advanced-5.6.19-1.rhel5.i386.rpm
Preparing ... ########################################### [100%]
1:mysql-client-advanced ########################################### [100%]
Third, the configuration of MySQL database
1. Start the MySQL service
[Email protected] mysql_installer]# CD/ETC/RC.D/INIT.D
[[Email protected] init.d]# service MySQL start
Starting MySQL ..... [OK]
2, modify the MySQL database root user's initial password, first check the initial password
[Email protected] mysql_installer]# Vi/root/.mysql_secret
# The random password set for the root user at Sun Nov 00:34:51 (local time): Kx65utyvovxn9vov
From the above can be the initial password is: Kx65utyvovxn9vov
[Email protected] 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-advanced MySQL Enterprise server-advanced Edition (commercial)
Copyright (c), the Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql>
/* Change Password to 123456*/
mysql> Update user Set Password=password (' 123456 ') where user= ' root ';
Query OK, 3 Rows Affected (0.00 sec)
Rows Matched:3 Changed:3 warnings:0
/* Refresh the permissions table */
mysql> flush Privileges;
Query OK, 0 rows Affected (0.00 sec)
3, login MySQL with new password 123456
[Email protected] 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-advanced MySQL Enterprise server-advanced Edition (commercial)
Copyright (c), the Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names 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
Can turn off this feature to get a quicker startup with-a
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 table test 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)