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

[mysql Learning] linux installs mysql, using install script (2)

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

Share

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

This article introduces the installation of MySQL 5.6.27 under Linux.

1. Download address

Https://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz

2. Decompression

Tar-zxf mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz

3. Move the package to the mysql folder

Mp mysql-5.6.27-linux-glibc2.5-x86_64 / usr/local/mysql

4. Add mysql user groups and mysql users

Groupadd mysql

Useradd-r-g mysql mysql

5. Install the database

Enter the mysql software directory: cd / usr/local/mysql

Change the current directory owner to mysql user: execute the command chown-R mysql:mysql. /

Install the database: execute the command. / scripts/mysql_install_db-- user=mysql

Change the current directory owner to root user: execute the command chown-R root:root. /

Change the current data directory owner to mysql user: execute the command chown-R mysql:mysql data

6. Start the mysql service

Service mysql start

7. Add the boot startup mysql service and copy the files in the mysql directory to the init load directory.

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

8. Modify the root user password of mysql

. / bin/mysqladmin-u root password 'password'

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