MySQL Start-up

Source: Internet
Author: User

1. Hand-activated directly with MYSQLD

[Email protected] bin]#/mysqld--defaults-file=.. /my.cnf140328 Ten:Geneva:Panax Notoginseng[ERROR] Fatal Error:please Read"Security"section of the manual toFindHow to run mysqld as root!140328 Ten:Geneva:Panax Notoginseng[ERROR] aborting140328 Ten:Geneva:Panax Notoginseng[Note].mysqld:shutdown complete[[email protected] bin]#./mysqld--defaults-file=.. /MY.CNF--user=MySQL140328 Ten:Geneva: -innodb:the InnoDB Memory heap is disabled140328 Ten:Geneva: -Innodb:mutexes and Rw_locks use InnoDB's own implementation140328 Ten:Geneva: -innodb:compressed Tables Use Zlib1.2.3140328 Ten:Geneva: -innodb:using Linux Native AIO140328 Ten:Geneva: -Innodb:initializing buffer pool, size =128.0M140328 Ten:Geneva: -innodb:completed initialization of buffer pool140328 Ten:Geneva: -Innodb:highest supportedfileformat is Barracuda.InnoDB:The log sequence numberinchibdata files does not matchinnodb:the log sequence numberinchThe ib_logfiles!140328 Ten:Geneva: -Innodb:database was wasn't shut down normally!innodb:starting crash recovery. innodb:reading tablespace information from the. ibd files ... Innodb:restoring possible half-written data pages from the Doublewriteinnodb:buffer ...140328 Ten:Geneva: -Innodb:waiting forThe background threads to start140328 Ten:Geneva: $InnoDB:5.5.Panax NotoginsengStarted Log sequence Number1595675140328 Ten:Geneva: $[Note] Serverhostname(bind-address):'0.0.0.0'; Port3306140328 Ten:Geneva: $[Note]-'0.0.0.0'resolves to'0.0.0.0';140328 Ten:Geneva: $[Note] Server socket created on IP:'0.0.0.0'.140328 Ten:Geneva: $[Note] Event scheduler:loaded0Events140328 Ten:Geneva: $[Note]./mysqld:ready forconnections. Version:'5.5.37'Socket'/tmp/mysql.sock'Port3306Source Distribution[[email protected]~]#PS-ef |grepMysqlmysql7641  7547  1 Ten:Genevapts/1    xx:xx:xx./mysqld--defaults-file=.. /MY.CNF--user=Mysqlroot7697  7661  0 Ten: topts/2    xx:xx:xx grepMysql[[email protected]~]#

2. Secure Boot

[Email protected] bin]#/mysqld_safe--defaults-file=.. /MY.CNF--user=mysql &[1]7758[email protected] bin]#140328 Ten: -: -Mysqld_safe Logging to'/usr/local/mysql/data/ora11g.err'.140328 Ten: -: -Mysqld_safe starting mysqld daemon with databases from/usr/local/mysql/Data[[email protected] bin]#PS-ef |grepMysqlroot7758  7661  0 Ten: -pts/2    xx:xx:xx/bin/SH./mysqld_safe--defaults-file=.. /MY.CNF--user=Mysqlmysql8024  7758  0 Ten: -pts/2    xx:xx:xx/usr/local/mysql/bin/mysqld--defaults-file=.. /MY.CNF--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--plugin-dir=/usr/local/mysql/lib/plugin--user=mysql--log-error=/usr/local/mysql/data/ora11g.err--pid-file=/usr/local/mysql/data/ora11g.pid--socket=/tmp/mysql.sock--port=3306Root8044  7661  0 Ten: -pts/2    xx:xx:xx grepMysql[[email protected] bin]#

3. Start with a service

[Email protected] support-files]# [[email protected] support-files]#./mysql.server startstarting MySQL [OK][[email protected] support-files]#PS-ef |grepMySQL Root8433     1  3 Ten: -pts/2    xx:xx:xx/bin/SH/usr/local/mysql/bin/mysqld_safe--datadir=/usr/local/mysql/data--pid-file=/usr/local/mysql/data/Ora11g.pidmysql8705  8433  A Ten: -pts/2    xx:xx:xx/usr/local/mysql/bin/mysqld--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--plugin-dir=/usr/local/mysql/lib/plugin--user=mysql--log-error=/usr/local/mysql/data/ora11g.err--pid-file=/usr/local/mysql/data/ora11g.pid--socket=/tmp/mysql.sock--port=3306Root8723  7661  0 Ten: -pts/2    xx:xx:xx grepMysql[[email protected] support-files]#

Put Mysql.server CP to/etc/rc.d/init.d/mysql, then Chkconfig--add MySQL is ok.

[Email protected] support-files]#CPmysql.server/etc/rc.d/init.d/MySQL [[email protected] support-files]# Chkconfig--add Mysql[[email protected] support-files]# Chkconfig--list |grepMysqlmysql0: Off1: Off2: On3: On4: On5: On6: Off[[email protected] support-files]# Service mysqld stopmysqld:unrecognized service[[email protected] support-files]# service MySQL stop shutting down MySQL. [OK] [[email protected] support-files]# service MySQL startstarting MySQL. [OK] [[email protected] support-files]#PS-ef |grepMySQL Root8808     1  1 Ten: -pts/2    xx:xx:xx/bin/SH/usr/local/mysql/bin/mysqld_safe--datadir=/usr/local/mysql/data--pid-file=/usr/local/mysql/data/Ora11g.pidmysql9073  8808  2 Ten: -pts/2    xx:xx:xx/usr/local/mysql/bin/mysqld--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--plugin-dir=/usr/local/mysql/lib/plugin--user=mysql--log-error=/usr/local/mysql/data/ora11g.err--pid-file=/usr/local/mysql/data/ora11g.pid--socket=/tmp/mysql.sock--port=3306Root9100  7661  0 Ten: -pts/2    xx:xx:xx grepMysql[[email protected] support-files]#

To view MySQL's startup parameters:

[Email protected] bin]#/mysqld--help--verbose | Less

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.