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

Install MySql-5.6.30 database in RPM format

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

Share

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

Operating system CentOS6.7 64 bit

Software package: MySQL-5.6.30-1.linux_glibc2.5.x86_64.rpm-bundle.tar

First use ssh to transfer remotely to Linux system (binary transmission)

Create a mysql directory under / usr/local to MySQL-5.6.30-1.linux_glibc2.5.x86_64.rpm-bundle.tar

Decompress to / usr/local/mysql

Tar-xf. / MySQL-5.6.30-1.linux_glibc2.5.x86_64.rpm-bundle.tar / usr/local/mysql/

The following files are generated

We only need to install server, client and devel files.

First verify the mysql file installed on the original system

2 uninstall the library file yum-y remove mysql-libs* this uninstall will cause some services to be uninstalled

Install the mysql server

Install the mysql client

Copy the configuration file for mysql

Cp / usr/share/mysql/my-default.cnf / etc/my.cnf

Database initialization

/ usr/bin/mysql_install_db

At this time, mysql users need a password to log in.

The red part of the picture below cat / root/.mysql_ secret is the root password of mysql.

Connect to the database and change the password

Mysql-u root-p_ttOLbbnRLFxNk4U

Change password SET PASSWORD=PASSWORD ('123123')

Settings that allow remote login

Change the user's password

UPDATE user set password=password ('123456') whereuser= "root"

Update user setpassword=password ('123456') where user= "root"

Change the host limit for remote login

Update user set host='%' whereuser= "root" and host='localhost'

Refresh authorization flush privileges

Set up boot self-boot (there is a big difference between version 7 and version 6)

Systemctl enablemysql 7

Chkconfig mysql on

Location of default installation

/ var/lib/mysql # database directory

/ usr/share/mysql # directory of configuration files

/ usr/bin # related command directory

/ etc/init.d/mysql # startup script

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