Original works, from the "Blue Blog" blog, Welcome to reprint, please be sure to indicate the following sources, otherwise, the legal responsibility to pursue copyright.
Deep Blue Blog:http://blog.csdn.net/huangyanlong/article/details/44085635
[[email protected] ~]# rpm-qa|grep-i MySQL
--Query whether the MySQL database is installed on the Linux system
Mysql-devel-5.1.66-2.el6_3.x86_64
Perl-dbd-mysql-4.013-3.el6.x86_64
Mysql-5.1.66-2.el6_3.x86_64
Mysql-server-5.1.66-2.el6_3.x86_64
Qt-mysql-4.6.2-25.el6.x86_64
Mysql-libs-5.1.66-2.el6_3.x86_64
You have new mail in/var/spool/mail/root
[[email protected] ~]#/etc/init.d/mysqldstart
--Start MySQL, or you can use the command: Service mysqld start
Initializing mysql database:installing mysql system tables ... Okfilling Help Tables ... OKto start mysqld at boot time has to copysupport-files/mysql.server to the right place for your systemplease Remembe R to SET A PASSWORD for the MySQL root USER! To does, start the server, then issue the following commands:/usr/bin/mysqladmin-u root password ' new-password '/usr/bin/ Mysqladmin-u root-h master.cloudera password ' new-password ' Alternatively you can run:/usr/bin/mysql_secure_ Installationwhich would also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers. See the Manual for more instructions. You can start the MySQL daemon with:cd/usr; /usr/bin/mysqld_safe &you can test the MySQL daemon with mysql-test-run.plcd/usr/mysql-test; Perl mysql-test-run.plplease Report No problems with The/usr/bin/mysqlbug script! [OK] Starting mySQLD: [OK]
[Email protected] ~]#/usr/bin/mysqladmin-u root password root
-- set root password
[Email protected] ~]# mysql-u [email protected]
--Log in to MySQL
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 8
Server version:5.1.66 Source Distribution
Copyright (c), Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql>quit
Add:
[[email protected] ~]#/etc/inint.d/mysqld stop
--Stop MySQL, or you can use the command: Service mysqld stop
[Email protected] ~]#/etc/inint.d/mysqld restart
--Restart MySQL, or you can use the command: service mysqld restart
Original works, from the "Blue Blog" blog, Welcome to reprint, please be sure to indicate the following sources, otherwise, the legal responsibility to pursue copyright.
Deep Blue Blog:http://blog.csdn.net/huangyanlong/article/details/44085635
MySQL startup, shutdown, restart command under Linux