Location>code7788 >text

Linux MySQL service setup for boot self-start

Popularity:418 ℃/2024-08-01 09:56:58

@

catalogs
  • preamble
  • synopsis
  • I. Preparatory work
  • II. Operational steps
    • 2.1 Starting the MySQL Service
    • 2.2 Copy configuration
    • 2.3 Assignment of authority
    • 2.4 Add as system service
    • 2.5 Validation
  • summarize


preamble

Please respect my original knowledge sharing and keep my blog in mind:South of the South i


Tip: Below is the body of this post, with the following examples for reference

synopsis

I. Preparatory work

take note of: Prepare the machine with MySQL already installed

II. Operational steps

2.1 Starting the MySQL Service

take note of: Here, mysql is started normally, and it doesn't do boot, we need to set up boot to boot the The file is copied to the/etc///directory mysql files Our files are usually in the root directory of the installation of thesupport-filesdirectory

cd /usr/local/mysql
#Start the service
service mysql start

2.2 Copy configuration

take note of: Operate with the root user

cp /usr/local/mysql/mysql/support-files/ /etc///mysql

2.3 Assignment of authority

chmod +x /etc//mysql

2.4 Add as system service

#add services
chkconfig --add mysql

#View the list of services (3, 4, 5 on or on means success)
chkconfig --list

#If it's off then run
chkconfig --level 345 mysqld on

2.5 Validation

# Check if MySQL service is up after reboot
reboot

summarize

I am.South of the South iRecord the drops grow a little bit every day, learning is never ending! Reprinted with link to original article!!!