Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of restarting MySQL Database under linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to restart the MySQL database under linux. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

The Mysql installed from the program installation package does not have the servcie mysqld restart script commonly used by Red Hat in the system, so restart the MYSQL database

Have to restart manually, directly execute Killall mysql, forced termination, may cause table damage, once caused table damage, the loss is huge.

A safe restart method is recommended here

$mysql_dir/bin/mysqladmin-u root-p shutdown

$mysql_dir/bin/safe_mysqld &

Mysqladmin and mysqld_safe are located in the bin directory of the Mysql installation directory and are easy to find.

Restart MySQL service under windows

For users who do not have the mysql graphical management side installed, start and stop the mysql service:

... \... \ bin > net stop mysql

... \... \ bin > net start mysql

How to start / stop / restart MySQL

Starting, stopping and restarting MySQL is an operation that must be supported by every webmaster who owns a VPS or independent server.

The following is a brief introduction to the method of operation:

I. start-up mode

1. Use service to start:

Service mysqld start

2. Use the mysqld script to start:

/ etc/inint.d/mysqld start

3. Use safe_mysqld to start:

Safe_mysqld&

2. Stop

1. Use service to start:

Service mysqld stop

2. Use the mysqld script to start:

/ etc/inint.d/mysqld stopmysqladmin shutdown

3. Restart

1. Use service to start:

Service mysqld restart

2. Use the mysqld script to start:

/ etc/inint.d/mysqld restart

Database MySQL uses functions to open, close, and view functions. You may encounter this kind of error when running mysql, as shown in the following code:

ERROR 1418: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you * might* want to use the less safe log_bin_trust_function_creators variable)

This is because the MYSQL database is not open. Execute the following code to turn it on:

SET GLOBAL log_bin_trust_function_creators=1

Similarly, the code to turn off the mysql function is:

SET GLOBAL log_bin_trust_function_creators=0

So what's the code to check the status of mysql? The code is as follows:

This is the end of the show variables like'% func%'; article on "how to restart the MySQL database under linux". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report