You will need
  • - installed MySQL server or the distribution package is available in repository.
  • credentials of root.
Instruction
1
Start a session as root in a console or terminal emulator. If the machine running a graphical environment, it is advisable to use a program that emulates a terminal. Try to run any applications of this type (there are about a dozen popular emulators, such as xterm or konsole, to be included in Linux distributions). - Use the shortcut in the main menu or the functionality of the application launcher. You can also pre-install a suitable terminal using, for example, Synaptic.Transition to the text console trigger by pressing Ctrl+Alt+F1 - Ctrl+Alt+F12 or by session in a graphical environment.Enter the credentials for root. A graphical terminal under another user previously, run the command su.
2
Check the current service status of MySQL database server. Enter командуservice mysqld statusи press Enter. Analyze the extracted text. The displayed message may indicate that the MySQL server:- running;- installed but not running;- not known (probably just not installed).Subsequent actions are taken depending on the results obtained.
3
Install MySQL server and configure it for further work if necessary. In a graphical environment, use Synaptic. To install from the command line will use the package Manager apt. Run the command:apt-cache search mysql and analyze the displayed list of packages. Then execute the following command:apt-get install <name of package>where <package name> enter one of the values obtained in the search result. Often in Linux distributions included a package named mysql, the installation of which leads to the installation of the most necessary to work with MySQL applications. If this package is present in the distribution, simply run the command:apt-get install mysqlи wait for installation to complete.Configure the server to work. Use mysql_install_db to initialize the primary database and mysqladmin utility for further settings.
4
Start the MySQL server. Follow командуservice mysqld startи analyze printed diagnostic message.
5
Check the running MySQL server. Use mysqlshow to display lists of databases, tables, and other data. Connect to the server via the console mysql client to implement a full-fledged work with data in existing databases.