MySQL installation and start-up on ArchLinux

Source: Internet
Author: User
Tags mysql in mysql database

"Guide" This paper introduces the installation and startup of MySQL in ArchLinux.

We can easily install MySQL on the archlinux. We can install this by using the following command:

PACMAN-SV MySQL

With just such a simple command, we can install the latest MySQL database on our system. Of course, we have to do some of the following work to make our MySQL server can be started up.

First we want to add MySQL users and groups, we can do this through the following command:

Groupadd MySQL (add MySQL group)

useradd-g MySQL mysql (add MySQL user)

We can then use the following command to install some of the predefined data tables for the MySQL database:

mysql_install_db--user=mysql

Then if we start the MySQL server there will be some hints, we have to do some of the following things:

Mkdir/var/lib/mysql

Touch/var/lib/mysql/myhost.err

After such an operation, we can start the MySQL server:

Mysqld_safe &

MySQL Server startup script

Mysqld_safe--mysql Server Startup script

Mysqld_safe is a recommended method for booting a MySQL server on UNIX or NetWare systems. Mysqld_safe adds a number of security features, such as restarting the server when an error occurs and writing the Run-time information to the error log file.

Here we should note that in order to be backward compatible with the old version of MySQL, the MySQL binary release also contains safe_mysqld as a link to mysqld_safe. However, we should not rely on this launcher, as it will be removed in future releases.

In the default case, if there is an executable mysqld-max,mysqld_safe

1 on Linux systems, Mysql-max RPM relies on mysqld_safe behavior. RPM installs an executable program called Mysqld-max, which causes Mysqld_safe to automatically invoke this executable from then on.

2 If you install a binary release containing the name Mysqld-max server, and then at a later time we update to a version of MySQL without Max, Mysqld_safe will still try to run the old Mysqld-max server. If we perform such an update, we should also launch remove the old Mysqld-max server and make sure that Mysqld_safe runs the new mysqld server.

To override the default behavior and show the server we want to run, we can specify a-mysqld or-mysqld-version option for our mysqld_safe.

Most of the options for Mysqld_safe are the same as mysqld.

mysqld Command line Options

All options specified in the command behavior Mysqld_safe are passed to mysqld. Do not specify them on the command line if we want to use any of the mysqld_safe specified and mysqld unsupported. Instead, we can list them in an optional file [Mysqld_safe] group.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.