Home > Database > Mysql Tutorial > body text

mysql how to shut down the server

coldplay.xixi
Release: 2020-08-24 16:10:51
Original
5432 people have browsed it

Mysql method to shut down the server: 1. Under Windows, the code is [cd c:\mysql\bin; mysqladmin -uroot shutdown]; 2. Under Linux, the code is [service mysql stop].

mysql how to shut down the server

Mysql method to shut down the server:

Under windows: mysql how to shut down the server

启动:
        1.cd c:\mysql\bin
        2.mysqld --console
    关闭:
        1.cd c:\mysql\bin
        2.mysqladmin -uroot shutdown
   还可以:
        启动:
        1.cd c:\mysql\bin
        2.net start mysql
    关闭:
        1.cd c:\mysql\bin
        2.net stop mysql
Copy after login

Under linux:

采用netstat -nlp查看mysql服务的状态
   命令行方式:
        开启  ./mysqld_safe &
        关闭  mysqladmin -uroot shutdown
   rpm方式安装的
        开启  service mysql start
        关闭  service mysql stop
   在命令行启动mysql时,如不加"--console",启动、关闭信息不在界面中显示,而是记录在安装目录下的data目录里,文件名一般是hostname.err,通过此文件查看mysql的控制台信息。
Copy after login

Execute command:

1.
mysql/bin>mysql -u root -p test < c:/test.sql
2.
mysql/bin>mysql -u root -p 然后输入密码
mysql>use test
mysql>source c:/test.sql
windows 和 linux 这两种都可以使用的
文件路径建议使用 / 而不是 \
Copy after login

Related learning recommendations: mysql tutorial

The above is the detailed content of mysql how to shut down the server. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!