Install MySQL 5.6.23 under Ubuntu

Source: Internet
Author: User
Tags crc32 deprecated

install MySQL 5.6.23 under Ubuntu
1. Download the source code package for the corresponding linux-generic. Unzip and rename the extracted folder to MySQL. Move to the/usr/local folder;Tar–xzf mysql-5.6.23-linux-glibc2.5-x86_64.tar.gzMV mysql-5.6.23-linux-glibc2.5-x86_64 MySQLsudo mv mysql/usr/local
2. Create user MySQL and group MySQL[email protected]: sudo groupadd mysql
[Email protected]: sudo useradd-r-g MySQL MySQL
3. Go to MySQL folder[email protected]: sudo cd/usr/local/mysql
4. Change MySQL directory own and GRP to MySQL[email protected]:/usr/local/mysql$ sudo chown-r mysql.[email protected]:/usr/local/mysql$ sudo chgrp-r MySQL.

5. Run the MySQL installation script and set the user
[Email protected]:/usr/local/mysql$ sudo./scripts/mysql_install_db--user=mysql
Installing MySQL system Tables..../bin/mysqld:error while loading shared libraries:libaio.so.1:cannot open shared objec T file:no such file or directory[Email protected]:/usr/local/mysql$sudo apt-get install Libaio-dev
(..........)
[Email protected]:/usr/local/mysql$ sudo./scripts/mysql_install_db--user=mysql
Installing MySQL system tables ... 2015-03-18 21:22:46 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-03-18 21:22:46 5284 [Note] innodb:using Atomics to ref count buffer pool pages
2015-03-18 21:22:46 5284 [Note] innodb:the InnoDB memory heap is disabled
2015-03-18 21:22:46 5284 [Note] innodb:mutexes and rw_locks use GCC atomic builtins
2015-03-18 21:22:46 5284 [Note] innodb:memory barrier is not used
2015-03-18 21:22:46 5284 [Note] innodb:compressed tables use zlib 1.2.3
2015-03-18 21:22:46 5284 [Note] innodb:using Linux native AIO
2015-03-18 21:22:46 5284 [Note] innodb:using CPU CRC32 Instructions
2015-03-18 21:22:46 5284 [Note] innodb:initializing buffer pool, size = 128.0M
2015-03-18 21:22:46 5284 [Note] innodb:completed initialization of buffer pool
2015-03-18 21:22:46 5284 [Note] innodb:the first specified data file./ibdata1 did not exist:a new database to be create D!
2015-03-18 21:22:46 5284 [Note] innodb:setting file./ibdata1 size to MB
2015-03-18 21:22:46 5284 [Note] Innodb:database physically writes the file full:wait ...
2015-03-18 21:22:46 5284 [Note] innodb:setting log file./ib_logfile101 size to + MB
2015-03-18 21:22:46 5284 [Note] innodb:setting log file./ib_logfile1 size to + MB
2015-03-18 21:22:47 5284 [Note] innodb:renaming log file./ib_logfile101 to./ib_logfile0
2015-03-18 21:22:47 5284 [Warning] innodb:new log files created, lsn=45781
2015-03-18 21:22:47 5284 [Note] innodb:doublewrite buffer not found:creating new
2015-03-18 21:22:47 5284 [Note] Innodb:doublewrite buffer created
2015-03-18 21:22:47 5284 [Note] innodb:128 rollback segment (s) is active.
2015-03-18 21:22:47 5284 [Warning] innodb:creating FOREIGN KEY constraint system tables.
2015-03-18 21:22:47 5284 [Note] innodb:foreign key constraint system tables created
2015-03-18 21:22:47 5284 [Note] innodb:creating tablespace and datafile system tables.
2015-03-18 21:22:47 5284 [Note] innodb:tablespace and datafile system tables created.
2015-03-18 21:22:47 5284 [Note] innodb:waiting for purge to start
2015-03-18 21:22:48 5284 [Note] innodb:5.6.23 started; Log sequence number 0
2015-03-18 21:22:52 5284 [Note] Binlog End
2015-03-18 21:22:52 5284 [Note] innodb:fts optimize thread exiting.
2015-03-18 21:22:52 5284 [Note] innodb:starting shutdown ...
2015-03-18 21:22:53 5284 [Note] Innodb:shutdown completed; Log sequence Number 1625977
Ok

Filling Help Tables ... 2015-03-18 21:22:53 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-03-18 21:22:53 5307 [Note] innodb:using Atomics to ref count buffer pool pages
2015-03-18 21:22:53 5307 [Note] innodb:the InnoDB memory heap is disabled
2015-03-18 21:22:53 5307 [Note] innodb:mutexes and rw_locks use GCC atomic builtins
2015-03-18 21:22:53 5307 [Note] innodb:memory barrier is not used
2015-03-18 21:22:53 5307 [Note] innodb:compressed tables use zlib 1.2.3
2015-03-18 21:22:53 5307 [Note] innodb:using Linux native AIO
2015-03-18 21:22:53 5307 [Note] innodb:using CPU CRC32 Instructions
2015-03-18 21:22:53 5307 [Note] innodb:initializing buffer pool, size = 128.0M
2015-03-18 21:22:53 5307 [Note] innodb:completed initialization of buffer pool
2015-03-18 21:22:53 5307 [Note] innodb:highest supported file format is Barracuda.
2015-03-18 21:22:53 5307 [Note] innodb:128 rollback segment (s) is active.
2015-03-18 21:22:53 5307 [Note] innodb:waiting for purge to start
2015-03-18 21:22:53 5307 [Note] innodb:5.6.23 started; Log sequence Number 1625977
2015-03-18 21:22:53 5307 [Note] Binlog End
2015-03-18 21:22:53 5307 [Note] innodb:fts optimize thread exiting.
2015-03-18 21:22:53 5307 [Note] innodb:starting shutdown ...
2015-03-18 21:22:55 5307 [Note] Innodb:shutdown completed; Log sequence Number 1625987
Ok

To start mysqld at boot time with to copy
Support-files/mysql.server to the right place for your system

REMEMBER to SET A PASSWORD for the MySQL root USER!
To does so, start the server, then issue the following commands:

./bin/mysqladmin-u root password ' new-password '
./bin/mysqladmin-u root-h de16-c6100 password ' new-password '

Alternatively you can run:

./bin/mysql_secure_installation

Which would 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. ;./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

CD mysql-test; Perl mysql-test-run.pl

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

Warning:found existing config file./my.cnf on the system.
Because This file might is in use, it is not replaced,
But is used in bootstrap (unless you used--defaults-file)
And when you later start the server.
The new default Config file was created as./MY-NEW.CNF,
Compare it with your file and take the changes you need. 6. After the above steps have been installed. The entire right to change the folder back, in addition to the data folder for our ordinary users to operate. [email protected]:/usr/local/mysql$ sudo chown-r root.
[Email protected]:/usr/local/mysql$ sudo chown-r mysql data
7. Ability to change the default configuration file location;[email protected]:/usr/local/mysql$ sudo cp support-files/my-default.cnf/etc/my.cnf
8. Start MySQL server in the background;
[Email protected]:/usr/local/mysql$ sudo bin/mysqld_safe--user=mysql &
[1] 5375
[Email protected]:/usr/local/mysql$ 150318 21:29:24 mysqld_safe Logging to '/usr/local/mysql/data/de16-c6100.err '.
150318 21:29:24 Mysqld_safe starting mysqld daemon with databases From/usr/local/mysql/data

9. Set the password of MySQL root privilege;
[Email protected]:/usr/local/mysql$ sudo bin/mysqladmin-u root password ' your password '
Warning:using a password on the command line interface can is insecure.
10. Move the run script to the INIT.D folder;
[Email protected]:/usr/local/mysql$ sudo cp support-files/mysql.server/etc/init.d/mysql.server
11. The execution status can be viewed at this time. Ability to control Status/start/stop/restart with service commands.
[Email protected]:/usr/local/mysql$ sudo service mysql.server status
* MySQL running (5477)
12. Set the boot start (which is inserted into the script that you open the opportunity to execute yourself), cancel the self-start Word defaults, remove;
[Email protected]:/usr/local/mysql$ sudo update-rc.d mysql.server defaults
Adding system Startup For/etc/init.d/mysql.server ...
/etc/rc0.d/k20mysql.server. /init.d/mysql.server
/etc/rc1.d/k20mysql.server. /init.d/mysql.server
/etc/rc6.d/k20mysql.server. /init.d/mysql.server
/etc/rc2.d/s20mysql.server. /init.d/mysql.server
/etc/rc3.d/s20mysql.server. /init.d/mysql.server
/etc/rc4.d/s20mysql.server. /init.d/mysql.server
/etc/rc5.d/s20mysql.server. /init.d/mysql.server
13. Make a symbolic connection, convenient commandinput (this useful program is used to connect to the client program (CLI) of MySQL server);
[Email protected]:/usr/local/mysql$sudo ln-s/usr/local/mysql/bin/mysql/usr/local/bin/mysql
14. At this point, just follow the good. can be easily tested.

[Email protected]:/usr/local/mysql$ MySQL
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server version:5.6.23 MySQL Community Server (GPL)

Copyright (c), 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> show databases;
+--------------------+
| Database |
+--------------------+
| Information_schema |
| Test |
+--------------------+
2 rows in Set (0.00 sec)

Mysql> exit
Bye

Install MySQL 5.6.23 under Ubuntu

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.