Get the App
SLTechnology News&Howtos  ›  Database  › 

Detailed steps for installing mysql-5.5.52 in binary common format

Shulou Source: shulou.com Published: 2022-06-01 19:39:45 10月03日 Update

The following mainly brings you the detailed steps of installing mysql-5.5.52 in binary general format. I hope the detailed steps of installing mysql-5.5.52 in binary general format can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.

Install mysql-5.5.52 based on binary universal format

Environment introduction:

Linux host: centos6.8

Mysql binary format package: mysql-5.5.52-linux2.6-x86_64.tar.gz

1. Extract the package to a specific directory

[root@centos6] # tar xf mysql-5.5.52-linux2.6-x86_64.tar.gz-C / usr/local/

2. Create a soft link

[root@centos6 ~] # ln-sv / usr/local/mysql-5.5.52-linux2.6-x86_64/ / usr/local/ mysql` / usr/local/mysql'-> `/ usr/local/mysql-5.5.52-linux2.6-x86_64/'

3. Enter the directory, check the installation help, and start the installation

[root@centos6 ~] # cd / usr/local/mysql [root@centos6 mysql] # cat INSTALL-BINARY// follow the prompts to go to the specified website to view help

[root@centos6 mysql] # groupadd mysql [root@centos6 mysql] # useradd-r-g mysql-s / bin/false mysql / / does not need to execute [root@centos6 mysql] # chown-R mysql. [root@centos6 mysql] # chgrp-R mysql. [root@centos6 mysql] # / scripts/mysql_install_db-- help// View option We do not use its default database location [root@centos6 mysql] # mkdir-pv here / mysql/data/// database file is best placed on the LVM of hard raid [root@centos6 mysql] # chown mysql:mysql / mysql/data/ [root@centos6 mysql] # ll-d / mysql/data/drwxr-xr-x. 2 mysql mysql 4096 Sep 16 21:44 / mysql/data/ [root@centos6 mysql] #. / scripts/mysql_install_db-- datadir=/mysql/data/-- user=mysql [root@centos6 mysql] # ls / mysql/data/mysql performance_schema test / / Database files of three systems generated during initialization of the data library

[root@centos6 mysql] # cp support-files/my-medium.cnf / etc/my.cnf cp: overwrite `/ etc/my.cnf'? Y / / instead of using the default mysql database installed on the system, you can overwrite the original configuration file [root@centos6 mysql] # vim / etc/my.cnf

[root@centos6 mysql] # cp support-files/mysql.server / etc/init.d/mysqld.server [root@centos6 mysql] # chkconfig-add mysqld.server

4. Test start

[root@centos6 mysql] # service mysqld.server startStarting MySQL.. [OK] [root@centos6 mysql] # ss-tlnLISTEN 0 50 *: 3306

Started successfully

At this point, there will be many more files or directories under the database directory.

5. Final configuration

Export man document

[root@centos6 ~] # vim / etc/man.config MANPATH / usr/local/mysql/man-- > add the line

Export header file

[root@centos6 ~] # ln-sv / usr/local/mysql/include/ / usr/include/ mysql` / usr/include/mysql'-> `/ usr/local/mysql/include/'

Export library files

[root@centos6 ~] # vim / etc/ld.so.conf.d/mysql.conf/usr/local/mysql/lib

Reload the system library file

[root@centos6 lib] # ldconfig-v

Export binary program path

[root@centos6] # vim / etc/profile.d/mysql.sh [root@centos6] #. / etc/profile.d/mysql.sh

For the above detailed steps on the installation of mysql-5.5.52 in binary general format, do you find it very helpful? If you need to know more, please continue to follow our industry information. I'm sure you'll like it.

Tags: Binary data database format file directory step system help following content library file configuration success three host location actual nonsense document Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Huawei Docker NVidia vpn