MySQL是一種關系數據庫管理系統,關系數據庫將數據保存在不同的表中,而不是將所有數據放在一個大倉庫內,這樣就增加了速度並提高了靈活性。對於Linux下Mysql啟動、關閉、重啟指令你知道麼?下面是學習啦小編為大家收集的Linux下Mysql啟動、關閉、重啟指令,歡迎大家閱讀:
[root@master ~]# rpm -qa|grep -i mysql
--查詢linux系統中是否安裝mysql數據庫
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
--啟動mysql,也可以使用命令:service mysqld start
[root@master ~]# /usr/bin/mysqladmin -u root password root
--設置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
補充:
[root@master ~]# /etc/inint.d/mysqld stop
--停止mysql,也可以使用命令:service mysqld stop
[root@master ~]# /etc/inint.d/mysqld restart
--重啟mysql,也可以使用命令:service mysqld restart
看了“Linux下Mysql啟動、關閉、重啟指令”還想看:
1.Linux系統重啟命令和關閉命令怎麼寫
2.liunx啟動/重啟/停上MYSQL的命令
3.Nginx服務器重啟關閉命令
4.linux重啟MYSQL的命令
5.windows下怎麼重啟mysql