Linux下Mysql啟動(dòng)、關(guān)閉、重啟指令
MySQL是一種關(guān)系數(shù)據(jù)庫管理系統(tǒng),關(guān)系數(shù)據(jù)庫將數(shù)據(jù)保存在不同的表中,而不是將所有數(shù)據(jù)放在一個(gè)大倉庫內(nèi),這樣就增加了速度并提高了靈活性。對(duì)于Linux下Mysql啟動(dòng)、關(guān)閉、重啟指令你知道么?下面是學(xué)習(xí)啦小編為大家收集的Linux下Mysql啟動(dòng)、關(guān)閉、重啟指令,歡迎大家閱讀:
Linux下Mysql啟動(dòng)、關(guān)閉、重啟指令
[root@master ~]# rpm -qa|grep -i mysql
--查詢linux系統(tǒng)中是否安裝mysql數(shù)據(jù)庫
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
[root@master ~]# /etc/init.d/mysqldstart
--啟動(dòng)mysql,也可以使用命令:service mysqld start
[root@master ~]# /usr/bin/mysqladmin -u root password root
--設(shè)置root密碼
[root@master ~]# mysql -u root@localhost
--登陸到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) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>quit
補(bǔ)充:
[root@master ~]# /etc/inint.d/mysqld stop
--停止mysql,也可以使用命令:service mysqld stop
[root@master ~]# /etc/inint.d/mysqld restart
--重啟mysql,也可以使用命令:service mysqld restart
看了“Linux下Mysql啟動(dòng)、關(guān)閉、重啟指令”還想看: