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

Mysql5.6 installation and deployment

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Mysql5.6 install

Here, the deployment is installed in a precompiled binary mode. Compared with the compilation and installation, it does not need to be compiled and can be used directly after the my.cnf is modified and initialized. This method is recommended for production environments.

Download a file

Domestic mirror source downloads faster, there is no need to go to the official website to download. Cd ~ wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.39-linux-glibc2.12-x86_64.tar.gz configuration file preparation here only the necessary parameters for installation and startup will be configured, and the parameters at the production level will not be described here. Cat / etc/ my.cnf [client] port = 3306socket = / data/coohua/mysql/mysql.sockdefault-character-set = UTF8 [mysqld] port = 3306socket = / data/coohua/mysql/mysql.sockbasedir = / app/3rd/mysql/mysqldatadir = / data/coohua/mysql/data/pid-file = / data/coohua/mysql/data/mysqld.piduser = mysqlcharacter-set-server = utf8innodb_large_prefix=onlower_case_table_names = 1server-id = 1 create MySQL user groupadd mysqluseradd-g mysql-M-s / Sbin/nologin mysql create mysql directory mkdir-p / app/3rd/mysqlmkdir-p / data/coohua/mysql prepare tar-zxf mysql-5.6.39-linux-glibc2.12-x86_64.tar.gz-C / app/3rd/mysql/ln-s / app/3rd/mysql/mysql-5.6.39-linux-glibc2.12-x86_64 / app/3rd/mysql/defaultchown-R mysql.mysql / app/3rd/mysql # program directory chown-R / before installation Data/coohua/mysql/ # data directory initialization installation cd / app/3rd/mysql/mysql-5.6.39-linux-glibc2.12-x86_64./scripts/mysql_install_db-- defaults-file=/app/3rd/mysql/default/my.cnf-- user=mysql has the following error prompt please install the following Perl modules before executing scripts/mysql_install_db:

Missing autoconf

Yum-y install autoconf

Error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

Missing libaio

Yum install-y libaio re-initializes the operation. / scripts/mysql_install_db-- defaults-file=/app/3rd/mysql/default/my.cnf-- user=mysql starts the mysql service / app/3rd/mysql/default/bin/mysqld_safe-- defaults-file=/app/3rd/mysql/default/my.cnf-- user=mysql & change the password. / bin/mysqladmin-S / tmp/mysql.sock-u root-h localhost password 'root' secure mysql -S / tmp/mysql.sock-uroot-hlocalhost-proot delete from mysql.user where password='' # Delete password-free user drop database test; # Delete test database

So far, the mysql5.6 version has been installed, but it is only installed, and there are a lot of subsequent optimizations to be made.

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