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

Linux system downloads detailed tutorials for installing Mysql

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

Share

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

This article mainly introduces the Linux system download and installation of Mysql detailed tutorials, the contents of the articles are carefully selected and edited by the author, with a certain pertinence, for everyone's reference significance is still relatively great, the following with the author to understand the Linux system download and install Mysql detailed tutorials.

1: download Mysql

Download address: http://dev.mysql.com/downloads/mysql/5.6.html#downloads

Download version: 5.6.33, general version, 64-bit under linux

You can also directly copy the 64-bit download address and download it with the command: wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

Extract the mysql package: tar-zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

2: copy the extracted mysql directory to the system's local software directory

Execute the command: cp mysql-5.6.33-linux-glibc2.5-x86_64 / usr/local/mysql-r

3: add system mysql groups and mysql users

Execute commands: groupadd mysql and useradd-r-g mysql mysql

4: install the database

Enter the directory to install the mysql software: execute the command 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

Installation of this database is complete

5: start mysql service and add boot to start mysql service

Add boot boot: execute the command cp support-files/mysql.server / etc/init.d/mysql, and put the startup script in the boot initialization directory

Start the mysql service: execute the command service mysql start

Execute command: ps-ef | when grep mysql sees the mysql service, it indicates that it started successfully, as shown in the figure.

6: modify the root password of mysql. The initial password of root is empty:

Execute the command:. / bin/mysqladmin-u root password 'password'

7: put the mysql client in the default path

Ln-s / usr/local/mysql/bin/mysql / usr/local/bin/mysql

Note: it is recommended to use soft chain, do not directly package file copy, to facilitate the system to install multiple versions of mysql

After reading the above detailed tutorials on downloading and installing Mysql in Linux system, many readers must have some understanding. If you need more industry knowledge and information, you can continue to follow our industry information column.

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