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

One-click installation of MySQL5.6.16 binary source code

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

Share

Shulou(Shulou.com)06/01 Report--

This article is mainly about one-click implementation of MySQL5.6.16 binary source installation content, if you are interested, let's take a look at this article, I believe that after reading a key to achieve MySQL5.6.16 binary source installation for everyone more or less reference value.

System environment 1.1 operating system [root@localhost ~] # cat / etc/redhat-release CentOS Linux release 7.4.1708 (Core) [root@localhost ~] # uname-rm10.0-693.el7.x86_64 x86monitoring 64 [root@localhost ~] # 1.2 pre-installation environment monitoring 1.2.1.SELinux and system firewall shutdown

Check selinux

[root@localhost] # sestatus-v SELinux status: disabled [root@localhost] #

Or use the getenforce check

[root@localhost ~] # getenforce Disabled

Temporarily shut down selinux

[root@localhost ~] # setenforce 0setenforce: SELinux is disabled [root@localhost ~] #

Permanently shut down, you need to modify the configuration file / etc/selinux/config of SELinux

[root@localhost] # vim / etc/selinux/configThis file controls the state of SELinux on the system.SELINUX= can take one of these three values:enforcing-SELinux security policy is enforced.permissive-SELinux prints warnings instead of enforcing.disabled-No SELinux policy is loaded.SELINUX=disabledSELINUXTYPE= can take one of three two values:targeted-Targeted processes are protected,minimum-Modification of targeted policy. Only selected processes are protected. Mls-Multi Level Security protection.SELINUXTYPE=targeted

Firewall Settin

Check the current firewall status, it is turned off, and the boot does not start automatically.

[root@localhost] # systemctl status firewalld.service ● firewalld.service-firewalld-dynamic firewall daemon Loaded: loaded (/ usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld (1)

Temporarily Closed

[root@localhost ~] # systemctl stop firewalld.service

Permanent shutdown, boot does not start

[root@localhost ~] # systemctl disable firewalld.service

1.2.2.swap partition is recommended not to configure or assign sufficient 4GB [root@localhost soft] # free-mtotal used free shared buff/cache availableMem: 1823 294 1163 9 366 1339Swap: 2047 020471.2.3. For the choice of file system, recommend xfs (easy to manage Support dynamic capacity expansion) [root@localhost ~] # df-hTFilesystem Type Size Used Avail Use% Mounted on/dev/mapper/centos-root xfs 17G 5.0G 13G 29% / devtmpfs devtmpfs 897M 0897M 0% / devtmpfs tmpfs 912M 0912m 0% / dev/shmtmpfs tmpfs 912M 9.1m 903M 1% / runtmpfs tmpfs 912M 0912M 0% / sys/fs/cgroup/dev/sda1 xfs 1014M 179M 836M 18% / boottmpfs tmpfs 183M 12K 183M 1% / run/user/42tmpfs tmpfs 183M 0 183M 0% / run/user/01.2.4. Operating system restrictions (ulimit-a view main parameter open files max user processes) [root@localhost ~] # ulimit-acore file size (blocks,-c) 0data seg size (kbytes,-d) unlimitedscheduling priority (- e) 0file size (blocks,-f) unlimitedpending signals (- I) 7168max locked memory (kbytes,-l) 64max memory size (kbytes -m) unlimitedopen files (- n) 1024pipe size (512 bytes,-p) 8POSIX message queues (bytes,-Q) 819200real-time priority (- r) 0stack size (kbytes,-s) 8192cpu time (seconds,-t) unlimitedmax user processes (- u) 7168virtual memory (kbytes -v) unlimitedfile locks (- x) unlimited II. Start installation MySQL5.6 version 2.1 installation preparation

(1) Software version: 5.6.16

(2) installation mode: binary mode is convenient and flexible, and it is convenient to manage data and configuration files.

Other installation methods: rpm installation, yum installation

(3) hardware requirements: virtual machine memory size: at least 2G

Minimum disk: 40G

(4) system environment: Centos6/7 Redhat 64 bit

The installation package management creates / opt/soft in the / opt/ directory, downloads the mysql installation package on the official website, and uploads the installation package to this directory through secureCRT or xshell.

[root@localhost] # ll / opt/soft/total 297656rwMurray-1 root root 3222 Mar 22 16:59 my.cnfrw-r--r-- 1 root root 304788904 Mar 13 20:30 mysql-5.6.16-linux-glibc2.5-x86_64.tar.gzrw-r--r-- 1 root root 2032 May 11 23:35 mysql_install_binary5.6.16.sh

The download address of MySQL is 5.6.40 here, which is consistent with the large version of 5.6.16 this time.

Https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.40-linux-glibc2.12-x86_64.tar.gz

The following is the MySQL download page, where you can choose the desired version

Https://dev.mysql.com/downloads/mysql/

2.2 Manual installation steps are as follows: 2.2.1 Trilogy

= > create a home directory: (basedir) and authorize

/ usr/local

Unzip the mysql installation package to the home directory and rename it (hidden version number)

[root@localhost soft] # tar-zxvf mysql-5.6.16-linux-glibc2.5-x86_64.tar.gz-C / usr/local/ [root@localhost soft] # ll-d / usr/local/mysql*lrwxrwxrwx 1 root root 46 May 15 09:09 / usr/local/mysql- > / usr/local/mysql-5.6.16-linux-glibc2.5-x86_64/drwxr-xr-x 13 root root 213 May 15 09:06 / usr/local/mysql-5.6 .16-linux-glibc2.5-x86_64 [root@localhost soft] #

Authorize mysql home directory to mysql users

[root@localhost soft] # id mysqluid=27 (mysql) gid=27 (mysql) groups=27 (mysql)

If you do not have a MySQL user, you can create a mysql user authorization and view the

[root@localhost soft] # chown-R mysql:mysql / usr/local/mysql [root@localhost soft] # ll-d / usr/local/mysqllrwxrwxrwx 1 mysql mysql 46 May 15 09:09 / usr/local/mysql- > / usr/local/mysql-5.6.16-linux-glibc2.5-x86_64/

2qu = > create a data directory (datadir) and authorize

/ data/mysql/

Authorize the data directory to mysql users

[root@localhost soft] # mkdir-p / data/mysql [root@localhost soft] # ll-ld / data/mysql/drwxr-xr-x 2 root root 6 May 15 09:13 / data/mysql/ [root@localhost soft] # chown-R mysql:mysql / data/mysql/ [root@localhost soft] # ll-ld / data/mysql/drwxr-xr-x 2 mysql mysql 6 May 15 09:13 / data/mysql/

3qu = > configuration file / etc/my.cnf (no need to take a closer look at the configuration file for the time being during the installation phase)

Use the already configured

Problem: if the / etc/my.cnf file is modified, just restart the MySQL service, and then load the modified my.cnf configuration file.

My.cnf is as follows

[root@localhost soft] # vim / etc/ my.cnf [client] port = 3306socket = / tmp/ mysql.sock [MySQL] prompt= "\ u@db\ R:\ m:\ s [\ d] >" no-auto- rehash [mysqld] user = mysqlport = 3306basedir = / usr/local/mysqldatadir = / data/mysql/socket = / tmp/mysql.sockcharacter-set-server = utf8mb4skip_name_resolve = 65535back_log = 1024max_connections = 512max_connect_errors = 1000000 tableholders Cache = 1024table_definition_cache = 1024table_open_cache_instances = 64thread_stack = 512Kexternal-locking = FALSEmax_allowed_packet = 32Msort_buffer_size = 4Mjoin_buffer_size = 4Mthread_cache_size = 768 "/ etc/my.cnf" [dos] 115L 3222C 1TO [client] port = 3306socket = / tmp/ mysql.sock [MySQL] prompt= "\ u@db\ R:\ m:\ s [\ d] >" no-auto- Rehash [mysqld] user = mysqlport = 3306basedir = / usr/local/mysqldatadir = / data/mysql/socket = / tmp/mysql.sockcharacter-set-server = utf8mb4skip_name_resolve = 1open_files_limit = 65535back_log = 1024max_connections = 512max_connect_errors = 1000000table_open_cache = 1024table_definition_cache = 1024table_open_cache_instances = 64thread_stack = 512Kexternal-locking = FALSEmax_allowed_packet = 32Msort_buffer_size = 4Mjoin_buffer_size = 4Mthread_cache_size = 768query_cache_size = 0query_cache_type = 0interactive_timeout = 600wait_timeout = 600tmp_table_size = 32Mmax_heap _ table_size = 32Mslow_query_log = 1slow_query_log_file = / data/mysql/slow.loglog-error = / data/mysql/error.loglong_query_time = 0.5server-id = 3306100log-bin = / data/mysql/mysql-binlogsync_binlog = 1binlog_cache_size = 4Mmax_binlog_cache_size = 128Mmax_binlog_size = 128Mexpire_logs_days = 7master_info_repository = TABLErelay_log_info_repository = TABLEgtid_mode = onenforce_gtid_consistency = 1logslave slaveupdatesbinlog _ Format = rowrelay_log_recovery = 1relay-log-purge = 1key_buffer_size = 32Mread_buffer_size = 8Mread_rnd_buffer_size = 4Mbulk_insert_buffer_size = 64Mlock_wait_timeout = 3600explicit_defaults_for_timestamp = 1innodb_thread_concurrency = 0innodb_sync_spin_loops = 100innodb_spin_wait_delay = 30transaction_isolation = REPEATABLE-READinnodb_buffer_pool_size = 1024Minnodb_buffer_pool_instances = 8innodb_buffer_pool_load_at_startup = 1innodbbufferpooldump _ At_shutdown = 1innodb_data_file_path = ibdata1:1G:autoextendinnodb_flush_log_at_trx_commit = 1innodb_log_buffer_size = 32Minnodb_log_file_size = 2Ginnodb_log_files_in_group = 2innodb_io_capacity = 2000innodb_io_capacity_max = 4000innodb_flush_neighbors = 0innodb_write_io_threads = 8innodb_read_io_threads = 8innodb_purge_threads = 4innodb_page_cleaners = 4innodb_open_files = 65535innodb_max_dirty_pages_pct = 50innodb _ Flush_method = O_DIRECTinnodb_lru_scan_depth = 4000innodb_checksum_algorithm = crc32innodb_lock_wait_timeout = 10innodb_rollback_on_timeout = 1innodb_print_all_deadlocks = 1innodb_file_per_table = 1innodb_online_alter_log_max_size = 4Ginternal_tmp_disk_storage_engine = InnoDBinnodb_stats_on_metadata = 0innodb_status_file = 1innodb_status_output = 0innodb_status_output_locks = 0performance_schemaperformance_schema = 1performance_schema_instrument ='% = on'innodb monitorinnodb _ monitor_enable= "module_innodb" innodb_monitor_enable= "module_server" innodb_monitor_enable= "module_dml" innodb_monitor_enable= "module_ddl" innodb_monitor_enable= "module_trx" innodb_monitor_enable= "module_os" innodb_monitor_enable= "module_purge" innodb_monitor_enable= "module_log" innodb_monitor_enable= "module_lock" innodb_monitor_enable= "module_buffer" innodb_monitor_enable= "module_index" innodb_monitor_enable= "module_ibuf_system "innodb_monitor_enable=" module_buffer_page "innodb_monitor_enable=" module_adaptive_hash "[mysqldump] quickmax_allowed_packet = 32M2.2.2 one step

(1) initialize MySQL (switch to mysql home directory scripts directory)

. / mysql_install_db-basedir=/usr/local/mysql-datadir=/mysql/data-defaults-/etc/my.cnf-user=mysql

-user=mysql after initialization is completed, the permissions for initializing the generated files are all mysql users, so the-- user=mysql parameter must be added. Otherwise, the generated files need to be authorized separately after initialization is completed.

After initialization is complete, there will be two OK prompts, and the initialization of the mysql will be completed successfully. At this point, view the files under / data/mysql, and the permission to view all files is mysql.

[root@localhost mysql] # cd / usr/local/mysql/scripts/ [root@localhost scripts] #. / mysql_install_db-basedir=/usr/local/mysql-datadir=/data/mysql-defaults-/etc/my.cnf-user=mysqlInstalling MySQL system tables...

View the log

[root@localhost ~] # less / data/mysql/error.log | grep ERROR05-15 09:18:07 4131 [ERROR] / usr/local/mysql/bin/mysqld: unknown option'--defaults-/etc/my.cnf'05-15 09:18:07 4131 [ERROR] Aborting

Carelessly, I wrote the configuration file incorrectly. Continue after modification

[root@localhost scripts] #. / mysql_install_db-- basedir=/usr/local/mysql-- datadir=/data/mysql-- defaults-file=/etc/my.cnf-- user=mysql**Installing MySQL system tables...OK**Filling help tables...OK**To start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER! To do so, start the server Then issue the following commands:**/usr/local/mysql/bin/mysqladmin-u root password' new-password'/usr/local/mysql/bin/mysqladmin-u root-h localhost.localdomain password' new-password'**Alternatively you can run:**/usr/local/mysql/bin/mysql_secure_installation**which will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.See the manual for more instructions.**You can start the MySQL daemon with:****cd. / usr/local/mysql/bin/mysqld_safe & * * You can test the MySQL daemon with mysql-test-run.plcd mysql-test Perl mysql-test-run.plPlease report any problems at http://bugs.mysql.com/The latest information about MySQL is available on the web at http://www.mysql.comSupport MySQL by buying support/licenses at http://shop.mysql.comWARNING: Found existing config file / usr/local/mysql/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 / usr/local/mysql/my-new.cnf,please compare it with your file and take the changes you need.WARNING: Default config file / etc/my.cnf exists on the systemThis file will be read by default by the MySQL serverIf you do not want to use this, either remove it, or use the-defaults-file argument to mysqld_safe when starting the server2.2.3MySQL installed successfully.

2.2.4 launch MySQL [root @ localhost ~] # / usr/local/mysql/bin/mysqld_safe & [1] 5771 [root@localhost ~] # 180515 09:28:48 mysqld_safe Logging to'/ data/mysql/error.log'.09:28:48 mysqld_safe Starting mysqld daemon with databases from / data/mysql/09:28:50 mysqld_safe mysqld from pid file / data/mysql//localhost.localdomain.pid ended [1] + Done / usr/local/mysql/bin/mysqld_ usr/local/mysql/bin/mysqld_ [root @ localhost ~] # ps-ef | grep 3306root 7094 3559 0 09:29 pts/2 00:00:00 grep-- color=auto 3306

Startup error, view log

The log shows that port 3306 is in use. Check the port situation.

[root@localhost ~] # netstat-nltp | grep mysqltcp 0 0 0.0.0.0 nltp 3306 0.0.0.0 LISTEN 1373/mysqld [root@localhost ~] # kill-9 1373 [root@localhost ~] #

Check mysql and port 3306 at this time

[root@localhost ~] # netstat-nltp | grep mysql [root@localhost ~] # netstat-nltp | grep 3306

Start the MySQL CVM again

[root@localhost ~] # / usr/local/mysql/bin/mysqld_safe & [1] 10033 [root@localhost ~] # [root@localhost ~] # 180515 09:38:52 mysqld_safe Logging to'/ data/mysql/error.log'.180515 09:38:52 mysqld_safe Starting mysqld daemon with databases from / data/mysql/

The successful startup is as follows

[root@localhost] # ps-ef | grep mysqlroot 10033 3559 0 09:38 pts/2 00:00:00 / bin/sh / usr/local/mysql/bin/mysqld_safemysql 11320 10033 3 09:38 pts/2 00:00:00 / usr/local/mysql/bin/mysqld-basedir=/usr/local/mysql-datadir=/data/mysql/-plugin-dir=/usr/local/mysql/lib/plugin-user=mysql-log-error=/data/mysql/error. Log-- open-files-limit=65535-- pid-file=/data/mysql//localhost.localdomain.pid-- socket=/tmp/mysql.sock-- port=3306root 11355 3559 0 09:39 pts/2 00:00:00 grep-- color=auto mysql [root@localhost ~] # ps-ef | grep 3306mysql 11320 10033 3 09:38 pts/2 00:00:00 / usr/local/mysql/bin/mysqld-basedir=/usr/local/mysql-datadir=/data/mysql/-plugin-dir= / usr/local/mysql/lib/plugin-- user=mysql-- log-error=/data/mysql/error.log-- open-files-limit=65535-- pid-file=/data/mysql//localhost.localdomain.pid-- socket=/tmp/mysql.sock-- port=3306root 11357 3559 0 09:39 pts/2 00:00:00 grep-- color=auto 3306 [root@localhost] # 2.2.5 MySQL password setting

Log in to MySQL CVM. There is no password by default

[root@localhost] # mysqlWelcome to the MariaDB monitor. Commands end with; or\ g.Your MySQL connection id is 1Server version: 5.6.16-log MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.root@db 09:39: [(none)] > 2.2.6 Optimization after installation

(1) password setting: currently, root users do not have a password, so set the root user password

Root@db 09:42: [(none)] > use mysql;Database changedroot@db 09:42: [mysql] > update user set password=password ('123456') where user='root';Query OK, 4 rows affected (0.00 sec) Rows matched: 4 Changed: 4 Warnings: 0root@db 09:42: [mysql] > flush privileges;Query OK, 0 rows affected (0.00 sec)

Test modified password

/ / Log in with the original empty password, indicating that the password is incorrect

[root@localhost ~] # mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

/ / Log in with the new password, successful.

[root@localhost] # mysql-uroot-p123456Welcome to the MariaDB monitor. Commands end with; or\ g.Your MySQL connection id is 4Server version: 5.6.16-log MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.Type 'help;' or'\ h' for help. Type'\ c' to clear the current input statement.root@db 09:47: [(none)] >

(2) mysql remote login user settings, mysql database user management after installing the database. Keep only one localhost root

Root@db 09:42: [mysql] > use mysqlDatabase changedroot@db 09:43: [mysql] > select host,user,password from user +-- +-+-- + | host | user | password | +- -+-+-- + | localhost | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | localhost.localdomain | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | 127.0.0.1 | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | |:: 1 | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | null | Localhost | localhost.localdomain | +-+-- -+ 6 rows in set (0.00 sec) root@db 09:43: [mysql] > delete from user where hostworthy localhost` or username installed root` Query OK, 5 rows affected (0.01sec) root@db 09:44: [mysql] > select host,user,password from user +-+ | host | user | password | +- -- + | localhost | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | +-- + 1 row in set (0.00 sec) root@db 09:44: [mysql] > [supplement]

(1) I have configured the environment variables of MySQL in advance.

The environment variable is as follows, and the environment variable is modified

Echo "export PATH=$PATH:/usr/local/mysql/bin" > > / etc/profilesource / etc/profile

(2) you can start mysql through the script that comes with msyql.

[root@localhost] # cp / usr/local/mysql/support-files/mysql.server / etc/init.d/mysqld [root@localhost ~] # ll-ld / etc/init.d/mysqld-rwxr-xr-x 1 root root 10880 May 15 09:34 / etc/init.d/mysqld [root@localhost ~] # / etc/init.d/mysqld status SUCCESS! MySQL running (11320)

We just started MySQL, so the state we see now is running.

(3) join boot self-startup

[root@localhost] # chkconfig-- add mysqld [root@localhost ~] # chkconfig-- list mysqldNote: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration.null If you want to list systemd services use 'systemctl list-unit-files'. To see services enabled on particular target use 'systemctl list-dependencies [target]'. Mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off

If you use the centos6 command above to add the command to turn on the service automatically, you can use the new command version 7.

How to view the system's current default startup project

[root@localhost ~] # systemctl list-unit-files

The above steps are implemented through the shell script. Here, put the MySQL binary package, MySQL installation shell, and configuration files in the / opt/soft directory.

[root@localhost] # ll / opt/soft/total 297656rwMurray-1 root root 3222 Mar 22 16:59 my.cnfrw-r--r-- 1 root root 304788904 Mar 13 20:30 mysql-5.6.16-linux-glibc2.5-x86_64.tar.gzrw-r--r-- 1 root root 2032 May 11 23:35 mysql_install_binary5.6.16.sh

The script is as follows

#! / bin/sh# test system: before using the Centos6.5 Centos7.4# script, prepare the binary installation package in advance, create / opt/soft and put the configuration file under / opt/soft in the / etc/my.cnf# script is insufficient: there is no judgment on the scheduled mysql home directory / usr/local/mysql and mysql data directory / data/mysql and / etc/my.cnf. The default is that these two directories do not exist or the directory has no content. If there is any content, there may be a warning # assign the corresponding variable group=mysqluser=mysqlbasedir=/usr/local/mysql/datadir=/data/mysql/mysql_package= "mysql-5.6.16-linux-glibc2.5-x86_64" # prepare to start echo "Installing:" $mysql_package#-- user creation-- # match the content in this file that begins with the value of the $group variable # create a group If the group exists, execute the following command directly #-- egrep looks for the specified pattern in the file #-- ^ means that the matching character must be in the first character $similar to ^, matching the last character .egrep "^ $group" / etc/group > & / dev/nullif [$?-ne 0] then groupadd $groupfi# to create a user If the user exists, directly execute the following command egrep "^ $user" / etc/passwd > & / dev/nullif [$?-ne 0] then useradd $user-g $group-p 123456-s / sbin/nologin-Mfi# the first song: extract the binary installation package tar-zxvf / opt/soft/$mysql_package.tar.gz-C / usr/local# rename the hidden version number cd / usr/local/mv $mysql_package mysql# number 2: number of creations According to directory mkdir-p $datadir# license-authorize mysql home directory basedir and mysql data directory datadircd / usr/local/mysqlchown-R $group:$user $basedirmkdir-p $datadirchown-R $group:$user $datadir# part III: configuration file (prepared in advance) cp / opt/soft/my.cnf / etc/# one step: mysql initializes cd $basedir/scripts/./mysql_install_db-- user=$user-- basedir=$basedir-- datadir=$datadir-- defaults-file=/etc/my.cnf# join open Machine self-starting cp $basedir/support-files/mysql.server / etc/rc.d/init.d/mysqldchkconfig-- add mysqld# environment variable modifies echo "export PATH=$PATH:$basedir/bin" > > / etc/profilesource / etc/profile# starts mysql service / etc/init.d/mysqld start# startup result echo $mysql_package "install success." # the login mysql``` script is written according to the installation steps above Here, the one-click deployment and installation of MySQL on another CVM through the script is as follows

[root@localhost ~] # cd / opt/soft/

[root@localhost soft] # ll

Total 297660

-rw-r--r--. 1 root root 3222 Apr 12 10:16 my.cnf

-rw-r--r--. 1 root root 304788904 Mar 13 20:30 mysql-5.6.16-linux-glibc2.5-x86_64.tar.gz

-rw-r--r--. 1 root root 1908 Apr 12 11:55 mysql_install_binary5.6.16.sh

-rw-r--r--. 1 root root 1904 Apr 12 11:57 mysql_install_binary5.6.33.sh

[root@localhost soft] #

[root@localhost soft] # sh mysql_install_binary5.6.16

Installing MySQL system tables...OK

Filling help tables...OK

Installation succeeded and startup failed.

WARNING: Default config file / etc/my.cnf exists on the system

This file will be read by default by the MySQL server

If you do not want to use this, either remove it, or use the

-- defaults-file argument to mysqld_safe when starting the server

Starting MySQL. ERROR! The server quit without updating PID file (/ data/mysql//localhost.localdomain.pid).

Mysql-5.6.16-linux-glibc2.5-x86_64 install success.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/ tmp/mysql.sock' (2)

View the log

[root@localhost soft] # cat / data/mysql/error.log | grep ERROR

2018-05-15 11:28:23 8163 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use

2018-05-15 11:28:23 8163 [ERROR] Do you already have another mysqld server running on port: 3306?

2018-05-15 11:28:23 8163 [ERROR] Aborting

'just like the manual installation error above, kill takes up 3306 of the thread.'

[root@localhost soft] # netstat-nltp | grep 3306

Tcp6 0 0: 3306: * LISTEN 3066/mysqld

[root@localhost soft] # kill-9 3066

[root@localhost soft] # netstat-nltp | grep 3306

Start MySQL again

[root@localhost soft] # / etc/init.d/mysqld start

Starting MySQL. SUCCESS!

[root@localhost soft] # mysql

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 1

Server version: 5.6.16-log MySQL Community Server (GPL)

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

Null

Root@db 11:37: [(none)] >

Start successfully, at this point, MySQL binary installation and deployment, one-click installation is complete.

Due to the limited time, it is inevitable that there will be mistakes. Please correct them. I hope it will be helpful to your study.

The above details about the installation of MySQL5.6.16 binary source code with one click, are they helpful to you? If you want to know more about it, you can continue to follow our industry information section.

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