Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install mysql5.6.35 with source code

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to install mysql5.6.35 with source code". In daily operation, I believe many people have doubts about how to install mysql5.6.35 with source code. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to install mysql5.6.35 with source code". Next, please follow the editor to study!

This time is to install mysql5.6.35 on the source code of oracle linux 6.5,

# create a mysql user to start the mysql service

[root@jinzy mysql-5.6.35] # groupadd mysql

[root@jinzy mysql-5.6.35] # useradd-g mysql mysql

# related software preparation

[root@jinzy ~] # cd / soft

[root@jinzy soft] # tar-xvf mysql-5.6.35.tar.gz

[root@jinzy soft] # chown-R root:root mysql-5.6.35

# create a mysql user to start the mysql service

[root@jinzy mysql-5.6.35] # groupadd mysql

[root@jinzy mysql-5.6.35] # useradd-g mysql mysql

# perform cmake operation

Make sure that all the cmake,make,gcc,ncurses,libaio,bison-related packets have been typed before cmake, otherwise you will receive all kinds of errors.

[root@jinzy mysql-5.6.35] # cmake-DBUILD_CONFIG=mysql_release-DCMAKE_INSTALL_PREFIX=/mysql/mysql-5.6.35

The following sections are omitted

.

.

-- Configuring done

-- Generating done

-- Build files have been written to: / soft/mysql-5.6.35

# perform make operation

[root@jinzy mysql-5.6.35] # make

The following sections are omitted

....

....

Linking CXX executable mysql_embedded

[99%] Built target mysql_embedded

Scanning dependencies of target mysqltest_embedded

[99%] Building CXX object libmysqld/examples/CMakeFiles/mysqltest_embedded.dir/__/__/client/mysqltest.cc.o

Linking CXX executable mysqltest_embedded

[99%] Built target mysqltest_embedded

Scanning dependencies of target my_safe_process

[100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o

Linking CXX executable my_safe_process

[100%] Built target my_safe_process

# install mysql software operation

[root@jinzy mysql-5.6.35] # make install

The following sections are omitted

....

....

-- Installing: / mysql/mysql-5.6.35/sql-bench/test-select

-- Installing: / mysql/mysql-5.6.35/sql-bench/test-big-tables

# perform database installation

[root@jinzy mysql-5.6.35] # mkdir-p / mydata/db

[root@jinzy mysql-5.6.35] # chown-R mysql:mysql / mydata

The my.cnf file I configured is given here for reference.

[mysql@jinzy ~] $cat / mydata/db/my.cnf

[mysql]

# CLIENT #

Port = 3306

Socket = / mydata/db/mysql.sock

[mysqld]

# GENERAL #

User = mysql

Default-storage-engine = InnoDB

Socket = / mydata/db/mysql.sock

Pid-file = / mydata/db/mysql.pid

# MyISAM #

Key-buffer-size = 32m

Myisam-recover = FORCE,BACKUP

# SAFETY #

Max-allowed-packet = 16m

Max-connect-errors = 1000000

# DATA STORAGE #

Datadir = / mydata/db/

# BINARY LOGGING #

Log-bin = / mydata/db/mysql-bin

Expire-logs-days = 14

Sync-binlog = 1

# CACHES AND LIMITS #

Tmp-table-size = 32m

Max-heap-table-size = 32m

Query-cache-type = 0

Query-cache-size = 0

Max-connections = 500,

Thread-cache-size = 50

Open-files-limit = 65535

Table-definition-cache = 1024

Table-open-cache = 2048

# INNODB #

Innodb-flush-method = O_DIRECT

Innodb-log-files-in-group = 2

Innodb-log-file-size = 64m

Innodb-flush-log-at-trx-commit = 1

Innodb-file-per-table = 1

Innodb-buffer-pool-size = 200m

# LOGGING #

Log-error = / mydata/db/mysql-error.log

Log-queries-not-using-indexes = 1

Slow-query-log = 1

Slow-query-log-file = / mydata/db/mysql-slow.log

[mysql@jinzy ~] $cd / mysql/mysql-5.6.35/

[mysql@jinzy mysql-5.6.35] $scripts/mysql_install_db-- defaults-file=/mydata/db/my.cnf-- user=mysql

Installing MySQL system tables...2017-01-17 19:06:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).

2017-01-17 19:06:45 0 [Note] Ignoring-- secure-file-priv value as server is running with-- bootstrap.

2017-01-17 19:06:45 0 [Note]. / bin/mysqld (mysqld 5.6.35-log) starting as process 6935.

OK

Filling help tables...2017-01-17 19:06:47 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).

2017-01-17 19:06:47 0 [Note] Ignoring-- secure-file-priv value as server is running with-- bootstrap.

2017-01-17 19:06:47 0 [Note]. / bin/mysqld (mysqld 5.6.35-log) starting as process 6957.

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 jinzy 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

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

. Omit part

# start the mysql service

[root@jinzy mysql-5.6.35] # cd / mysql/mysql-5.6.35/

[root@jinzy mysql-5.6.35] # / bin/mysqld_safe-- defaults-file=/mydata/db/my.cnf-- user=mysql &

[1] 7774

[root@jinzy mysql-5.6.35] # 170117 21:17:11 mysqld_safe Logging to'/ mydata/db/mysql-error.log'.

170117 21:17:11 mysqld_safe Starting mysqld daemon with databases from / mydata/db/

[root@jinzy mysql-5.6.35] #

[root@jinzy mysql-5.6.35] # ps-ef | grep mysqld

Root 7774 1091 0 21:17 pts/0 00:00:00 / bin/sh. / bin/mysqld_safe-defaults-file=/mydata/db/my.cnf-user=mysql

Mysql 8227 7774 3 21:17 pts/0 00:00:00. / bin/mysqld-defaults-file=/mydata/db/my.cnf-basedir=. -datadir=/mydata/db/-plugin-dir=./lib/plugin-user=mysql-log-error=/mydata/db/mysql-error.log-open-files-limit=65535-pid-file=/mydata/db/mysql.pid-socket=/mydata/db/mysql.sock

Root 8251 1091 0 21:17 pts/0 00:00:00 grep mysqld

# testing service

[root@jinzy mysql-5.6.35] # export MYSQL_UNIX_PORT=/mydata/db/mysql.sock

[root@jinzy mysql-5.6.35] # bin/mysqladmin version

Bin/mysqladmin Ver 8.42 Distrib 5.6.35, for Linux on x86_64

Copyright (c) 2000, 2016, 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.

Server version 5.6.35-log

Protocol version 10

Connection Localhost via UNIX socket

UNIX socket / mydata/db/mysql.sock

Uptime: 4 min 33 sec

Threads: 1 Questions: 4 Slow queries: 0 Opens: 70 Flush tables: 1 Open tables: 63 Queries per second avg: 0.014

[root@jinzy mysql-5.6.35] #. / bin/mysqladmin-u root password

New password:

Confirm new password:

[root@jinzy mysql-5.6.35] #

End!

At this point, the study on "how to install mysql5.6.35 with source code" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report