Install MySQL 5.6.23 and ubuntu5.6.23 in Ubuntu

Source: Internet
Author: User
Tags crc32

Install MySQL 5.6.23 and ubuntu5.6.23 in Ubuntu
Install MySQL 5.6.23 in Ubuntu
1. download the source code package for Linux-generic, decompress it, rename the decompressed folder to mysql, and move it to the/usr/local directory; tar-xzf mysql-5.6.23-linux-glibc2.5-x86_64.tar.gzmv mysql-5.6.23-linux-glibc2.5-x86_64 mysql sudo mv mysql/usr/local
2. Create user mysql and group mysqlvonzhou @ de16-C6100: sudo groupadd mysql
Vonzhou @ de16-C6100: sudo useradd-r-g mysql
3. Enter the mysql directory vonzhou @ de16-C6100: sudo cd/usr/local/mysql
4. Change the mysql folder own and grp to mysqlvonzhou @ de16-C6100:/usr/local/mysql $ sudo chown-R mysql. vonzhou @ de16-C6100:/usr/local/mysql $ sudo chgrp-R mysql.

5. Execute the mysql installation script and set the user
Vonzhou @ de16-C6100:/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 object file: No such file or directoryvonzhou @ de16-C6100:/usr/local/mysql $ sudo apt-get install libaio-dev
(..........)
Vonzhou @ de16-C6100:/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 DEFAULT value is deprecated. Please use -- explicit_defaults_for_timestamp server option (see documentation for more details ).
21:22:46 5284 [Note] InnoDB: Using atomics to ref count buffer pool pages
21:22:46 5284 [Note] InnoDB: The InnoDB memory heap is disabled
21:22:46 5284 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
21:22:46 5284 [Note] InnoDB: Memory barrier is not used
21:22:46 5284 [Note] InnoDB: Compressed tables use zlib 1.2.3
21:22:46 5284 [Note] InnoDB: Using Linux native AIO
21:22:46 5284 [Note] InnoDB: Using CPU crc32 instructions
21:22:46 5284 [Note] InnoDB: Initializing buffer pool, size = 128.0 M
21:22:46 5284 [Note] InnoDB: Completed initialization of buffer pool
21:22:46 5284 [Note] InnoDB: The first specified data file./ibdata1 did not exist: a new database to be created!
21:22:46 5284 [Note] InnoDB: Setting file./ibdata1 size to 12 MB
21:22:46 5284 [Note] InnoDB: Database physically writes the file full: wait...
21:22:46 5284 [Note] InnoDB: Setting log file./ib_logfile101 size to 48 MB
21:22:46 5284 [Note] InnoDB: Setting log file./ib_logfile1 size to 48 MB
21:22:47 5284 [Note] InnoDB: Renaming log file./ib_logfile101 to./ib_logfile0
21:22:47 5284 [Warning] InnoDB: New log files created, LSN = 45781
21:22:47 5284 [Note] InnoDB: Doublewrite buffer not found: creating new
21:22:47 5284 [Note] InnoDB: Doublewrite buffer created
21:22:47 5284 [Note] InnoDB: 128 rollback segment (s) are active.
21:22:47 5284 [Warning] InnoDB: Creating foreign key constraint system tables.
21:22:47 5284 [Note] InnoDB: Foreign key constraint system tables created
21:22:47 5284 [Note] InnoDB: Creating tablespace and datafile system tables.
21:22:47 5284 [Note] InnoDB: Tablespace and datafile system tables created.
21:22:47 5284 [Note] InnoDB: Waiting for purge to start
21:22:48 5284 [Note] InnoDB: 5.6.23 started; log sequence number 0
21:22:52 5284 [Note] Binlog end
21:22:52 5284 [Note] InnoDB: FTS optimize thread exiting.
21:22:52 5284 [Note] InnoDB: Starting shutdown...
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 DEFAULT value is deprecated. Please use -- explicit_defaults_for_timestamp server option (see documentation for more details ).
21:22:53 5307 [Note] InnoDB: Using atomics to ref count buffer pool pages
21:22:53 5307 [Note] InnoDB: The InnoDB memory heap is disabled
21:22:53 5307 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
21:22:53 5307 [Note] InnoDB: Memory barrier is not used
21:22:53 5307 [Note] InnoDB: Compressed tables use zlib 1.2.3
21:22:53 5307 [Note] InnoDB: Using Linux native AIO
21:22:53 5307 [Note] InnoDB: Using CPU crc32 instructions
21:22:53 5307 [Note] InnoDB: Initializing buffer pool, size = 128.0 M
21:22:53 5307 [Note] InnoDB: Completed initialization of buffer pool
21:22:53 5307 [Note] InnoDB: Highest supported file format is Barracuda.
21:22:53 5307 [Note] InnoDB: 128 rollback segment (s) are active.
21:22:53 5307 [Note] InnoDB: Waiting for purge to start
21:22:53 5307 [Note] InnoDB: 5.6.23 started; log sequence number 1625977
21:22:53 5307 [Note] Binlog end
21:22:53 5307 [Note] InnoDB: FTS optimize thread exiting.
21:22:53 5307 [Note] InnoDB: Starting shutdown...
21:22:55 5307 [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:

./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 will also give you the option of removing the test
Databases and anonymous user created by default. This is
Stronugly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon:

Cd ..;./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

Http://www.mysql.com

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

WARNING: Found existing config file./my. cnf on the system.
Because this file might be in use, it was not replaced,
But was 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,
Please compare it with your file and take the changes you need. 6. after the installation is complete, the ownership of the directory is changed back, except the data directory can be operated by our common users; vonzhou @ de16-C6100: /usr/local/mysql $ sudo chown-R root.
Vonzhou @ de16-C6100:/usr/local/mysql $ sudo chown-R mysql data
7. You can change the location of the default configuration file; vonzhou @ de16-C6100:/usr/local/mysql $ sudo cp support-files/my-default.cnf/etc/my. cnf
8. Start mysql server in the background;
Vonzhou @ de16-C6100:/usr/local/mysql $ sudo bin/mysqld_safe -- user = mysql &
[1] 5375
Vonzhou @ de16-C6100:/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 for the MySQL root permission;
Vonzhou @ de16-C6100:/usr/local/mysql $ sudo bin/mysqladmin-u root password 'your password'
Warning: Using a password on the command line interface can be insecure.
10. Move the execution script to the init. d directory;
Vonzhou @ de16-C6100:/usr/local/mysql $ sudo cp support-files/mysql. server/etc/init. d/mysql. server
11. Now you can view the running status. You can use the status/start/stop/restart control of the service command;
Vonzhou @ de16-C6100:/usr/local/mysql $ sudo service mysql. server status
* MySQL running (5477)
12. Set boot start (that is, insert it to the scripts that run automatically at the startup). If you cancel auto start, ults-> remove;
Vonzhou @ de16-C6100:/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. Establish a symbolic connection to facilitate command input (this utility is used to connect to the MySQL server Client Program (CLI ));
Vonzhou @ de16-C6100:/usr/local/mysql $ sudo ln-s/usr/local/mysql/bin/mysql/usr/local/bin/mysql
14. Now, we have followed suit and can perform a simple test. Vonzhou @ de16-C6100:/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) 2000,201 5, 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 |
| Test |
+ -------------------- +
2 rows in set (0.00 sec)

Mysql> exit
Bye

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.