How To Start Mysql Server

Table of contents:

How To Start Mysql Server
How To Start Mysql Server

Video: How To Start Mysql Server

Video: How To Start Mysql Server
Video: MySQL Workbench: How to Start/Stop Server 2024, May
Anonim

Free, fast, flexible and open source, MySQL is one of the most commonly used products in the field of relational databases. Servers of this type operate on most hosting sites on the Internet. Having a distribution kit of this DBMS, you can run the MySQL server on your machine.

How to start mysql server
How to start mysql server

Necessary

  • - installed MySQL server or distribution package in the available repository;
  • - root credentials.

Instructions

Step 1

Begin a root user session in a console or terminal emulator. If a graphical environment is running on the machine, it is advisable to use a program that emulates a terminal. Try running any of these types of applications (there are about a dozen popular emulators such as xterm or konsole included with Linux distributions). Use the shortcut in the main menu of the shell or the application launcher functionality. You can also pre-install a suitable terminal using, for example, Synaptic. Go to the text console by pressing the keyboard shortcuts Ctrl + Alt + F1- Ctrl + Alt + F12 or by logging out in a graphical environment. Enter root credentials. In a graphical terminal, when working as a different user, first execute the su command

Step 2

Check the current state of the MySQL database server service. Type service mysqld status and press Enter. Analyze the displayed text. The displayed message may indicate that the MySQL server is: - already running - installed but not running - not known (most likely just not installed) Take the next action based on the results you get

Step 3

Install MySQL server and configure it for further work, if necessary. In a graphical environment, use Synaptic. For command line installation, use the apt package manager. Run the command: apt-cache search mysql and parse the displayed package list. Then run a command like: apt-get install where instead of enter one of the values obtained as a result of the search. Linux distributions often include a package named mysql, the installation of which leads to the installation of most of the applications necessary for working with MySQL. If such a package is present in the distribution, simply run the command: apt-get install mysql and wait for the installation to complete. Configure the server to work. Use the mysql_install_db utility to initialize the databases for the first time and the mysqladmin utility for further configuration

Step 4

Start MySQL server. Run the command service mysqld start and analyze the displayed diagnostic message

Step 5

Check the running MySQL server. Use the mysqlshow utility to display lists of databases, tables, and other data. Connect to the server using the mysql console client for full-fledged work with data in existing databases.

Recommended: