Home > Database > Mysql Tutorial > how install mysql with linux

how install mysql with linux

Jennifer Aniston
Release: 2024-12-30 15:09:12
Original
193 people have browsed it

How to install MySQL on Linux using the command line?

  • To install MySQL on Linux using the command line, start by updating the package manager cache with the following command:

    <code>$ sudo apt update</code>
    Copy after login
  • Next, install the MySQL server package with the following command:

    <code>$ sudo apt install mysql-server</code>
    Copy after login
  • Once the installation is complete, you can verify that MySQL is running by checking the status of the service with the following command:

    <code>$ sudo systemctl status mysql</code>
    Copy after login

How to configure MySQL after installation on Linux?

  • Once MySQL is installed, you can configure it by editing the configuration file located at /etc/mysql/mysql.conf.d/mysqld.cnf.
  • Some common settings that you may want to adjust include:

    • The port that MySQL listens on (default: 3306)
    • The maximum number of connections (default: 151)
    • The maximum packet size (default: 16MB)
  • Once you have made your changes, you can save the file and restart MySQL with the following command:

    <code>$ sudo systemctl restart mysql</code>
    Copy after login

What are the system requirements for installing MySQL on Linux?

  • The system requirements for installing MySQL on Linux are as follows:

    • A processor that supports the x86-64 architecture
    • A minimum of 512MB of RAM
    • A minimum of 1GB of free disk space
    • A stable internet connection

The above is the detailed content of how install mysql with linux. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template