In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "Linux how to start and stop Mysql database", in daily operation, I believe many people in Linux how to start and stop Mysql database problems have doubts, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "Linux how to start and stop Mysql database" doubts helpful! Next, please follow the small series to learn together!
How to Start/Stop/Restart MySQL Database
1. Check the MySQL version
Method 1: Status;
Select version();
2. Mysql Start, Stop, Restart Common Commands
a. Starting mode
1. Start with service:
[root@localhost /]# service mysqld start (version 5.0 is mysqld)
[root@szxdb etc]# service mysql start (version 5.5.7 is mysql)
2. Start with mysqld script:
/etc/inint.d/mysqld start
3. Start with safe_mysqld:
safe_mysqld&
b) Stop
1. Start with service:
service mysqld stop
2. Start with mysqld script:
/etc/inint.d/mysqld stop
3、mysqladmin shutdown
c. Restart
1. Start with service:
service mysqld restart
service mysql restart (version 5.5.7 command)
2. Start with mysqld script:
/etc/init.d/mysqld restart
Second, connect MySQL:
Format: mysql -h host address-u user name-p user password
Example 1: Connect to MYSQL on the local machine
Find mysql installation directory, generally you can directly type the command mysql -uroot -p, prompt you to enter the password after carriage return, if just installed MYSQL, super user root is no password, so enter directly into MYSQL, MYSQL prompt is: mysql>
Connect to MySQL on a remote host
Assume that the IP of the remote host is 10.0.0.1, the username is root, and the password is 123. Type the following command:
mysql -h20.0.0.1 -uroot -p123
(Note: u and root can be added without spaces, and the same is true for others)
3. Exit MySQL command
exit (carriage return)
At this point, the study of "how to start and stop Mysql database in Linux" is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.