Four ways to start MySQL

Source: Internet
Author: User

four ways to start MySQL:1, mysqld start MySQL server:./mysqld--defaults-file=/etc/my.cnf--user=root Client connection: MySQL--defaults-file=/etc/My.cnformysql-s/tmp/Mysql.sock2, mysqld_safe start MySQL server:./mysqld_safe--defaults-file=/etc/my.cnf--user=root &Client connection: MySQL--defaults-file=/etc/My.cnformysql-s/tm/Mysql.sock3, MYSQL.SERVERCP-v/usr/local/mysql/support-files/mysql.server/etc/init.d/Chkconfig--add mysql.server start MySQL server: Service mysql.server {start|stop|restart|reload|force-reload|Status} Client connection: Same as 1,24, Mysqld_multimkdir $MYSQL _base/Data2cat<<-EOF>>/etc/My.cnf[mysqld_multi]mysqld=/usr/local/mysql/bin/Mysqld_safemysqladmin=/user/local/mysql/bin/Mysqladminuser=Mysqladminpassword=Mysqladmin[mysqld3306]port=3306Socket=/tmp/Mysql3306.sockpid-file =/tmp/Mysql3306.pidskip-external-lockingkey_buffer_size=16mmax_allowed_packet=1mtable_open_cache= -sort_buffer_size=512knet_buffer_length=8kread_buffer_size=256kread_rnd_buffer_size=512kmyisam_sort_buffer_size=8Mbasedir=/usr/local/Mysqldatadir=/usr/local/mysql/Data[mysqld3307]port=3307Socket=/tmp/Mysql3307.sockpid-file =/tmp/Mysql3307.pidskip-external-lockingkey_buffer_size=16mmax_allowed_packet=1mtable_open_cache= -sort_buffer_size=512knet_buffer_length=8kread_buffer_size=256kread_rnd_buffer_size=512kmyisam_sort_buffer_size=8Mbasedir=/usr/local/Mysqldatadir=/usr/local/mysql/Data2eof#mysql-s/tmp/Mysql3306.sockmysql>grant SHUTDOWN on * * to'mysqladmin'@'localhost'Identified by'mysqladmin'with grant option; #mysql-s/tmp/Mysql3307.sockmysql>grant SHUTDOWN on * * to'mysqladmin'@'localhost'Identified by'mysqladmin'with grant option; start MySQL server:./mysqld_multi--defaults-file=/etc/my.cnf Start3306-3307shut down MySQL server: Mysqladmin shutdown can refer to<>http://dev.mysql.com/doc/refman/5.1/zh/database-administration.html#server-side-scripts

Four ways to start MySQL

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.