MySQL login and start MySQL service

Source: Internet
Author: User
Tags mysql login

One. mysql Login


no mysql.sock . mysql-u Root - H 192.168.0.1-p


Two. Turn on MySQL service


1, mysqld daemon start


Mysqld is the daemon for MySQL, which starts by reading the configuration parameters in the [mysqld] and [Server] groups in the my.cnf file. In general, we call mysqld in this way manually, and if it is not for the purpose of debugging, we generally do not do so. This way if the startup fails, the error message will only be output from the terminal, rather than logging in the error log file, so that if MySQL crashes, we do not know why, so this startup mode is generally not used in the production environment, and generally in the debugging (Debug) system to use.
Start method:


[Email protected] libexec]#./mysqld


2, Mysqld_safe start

< Span style= "font-family: ' italics _gb2312 '; Background-color:rgb (255,255,255); Line-height:normal;color:rgb (51,51,51); font-size:18px; " >
mysqld_safe is a startup script that invokes Mysqld startup and logs error messages to the error log if a startup error occurs, Mysqld_ Safe starts mysqld and monitor mysqld two processes, so Mysqld_safe restarts the mysqld process if the mysqld process terminates abnormally.
Start method:
symbol" & "means to start

3, mysql.server start

< Span style= "font-family: ' italics _gb2312 '; Background-color:rgb (255,255,255); Line-height:normal;color:rgb (51,51,51); font-size:18px; " >
mysql.server is also a startup script that calls Mysqld_safe scripts. It executes files in $mysql_base/share/mysql/mysql.server and Support-files/mysql.server.
Start method:
[[email protected] ~]# chmod u+x/etc/init.d/mysql 

4, Mysqld_multi multi-instance start



MySQL login and start MySQL service

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.