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

Why do you choose two process packages to install mysql in production environment

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

Share

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

The following is to understand why the production environment installation mysql should choose the two process package installation, I believe everyone will benefit a lot after reading, the text is not much in the essence, hope that the production environment installation mysql why to choose the two process package installation of this short content is what you want.

In order to avoid conflicts, you can consider uninstalling the MySQL installation package that comes with Linux first. You can use "rpm-qa | grep MySQL" to check whether MySQL-related packages are installed.

Log in as root and install mysql

Useradd mysql

Cd / usr/local

Tar zxvf / tmp/mysql-5.1.45-linux-x86-icc-glibc23.tar.gz

Ln-s mysql-5.1.45-linux-x86_64-icc-glibc23 mysql

Cd mysql

Cp support-file/my-large.cnf / etc/my.cnf

Chown-R mysql.

Chgrp-R mysql.

Scripts/mysql_install_db-user=mysql

Chown-R root.

Chown-R mysql data

Mv data / home/mysql/

Ln-s / home/mysql/data.

Configure mysql as a self-starting service and start

Cp support-files/mysql.server / etc/init.d/mysqld

Chkconfig mysqld on

/ etc/init.d/mysqld start

Run the following command to set the mysql root password

/ usr/local/mysql/bin/mysqladmin-u root password' your_password'

Use scripts that come with mysql or manually execute commands to enhance security and delete anonymous users. The way to automate is to execute the following command under root user:

. / bin/mysql_secure_installation

Then follow the prompts to delete anonymous accounts and accounts with empty passwords.

You can delete an anonymous account manually as follows

Mysql-u root

DELETE FROM mysql.user WHERE User=''

FLUSH PRIVILEGES

After reading this article on why to install mysql in production environment, many readers will want to know more about it. If you need more industry information, you can 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