Home  >  Article  >  Database  >  How to open mysql in wamp

How to open mysql in wamp

藏色散人
藏色散人Original
2020-09-30 10:20:435338browse

How to open mysql in wamp: first open the bin folder of the mysql installation directory under wamp; then start the MySQL server program; finally open the command processing window and start mysql.

How to open mysql in wamp

Recommended: "mysql tutorial"

Start the MySql service

 1. 打开命令行,打开wamp下的mysql安装目录的bin文件夹(我把Wamp server安装在G盘)

How to open mysql in wamp

    ##Start the MySQL server program, enter: mysqld. (Please note that this is mysqld, not mysql)

  1. How to open mysql in wamp
3.打开mysql的客户端窗口:即打开命令处理窗口,再次进入mysql的bin目录,输入mysql -h hostname -u username -p就可以启动mysql了。在这里,我的hostname是localhost,username为root。
Difference


①mysql 和mysqld 的区别:
    mysqld is a server program
  • mysql is a command line client program
Configure environment variables, so you don’t have to enter such a long path every time

Find the [Path] variable and click [ Edit], in the variable value box in the [Edit System Variables] dialog box that pops up, add ";" MySQL's bin directory. My directory here is: ;G:\wamp\bin\mysql\mysql5.6.12\bin;

The mysql service was successfully started and logged in.


How to open mysql in wamp Done.

Start the apache service

Let’s get started first

在windows下使用http.exe命令的例子:
平时我们使用最多的可能就是用http.exe命令安装、开启、停止,删除apache服务这些操作。

httpd -k install 
将Apache注册为windows服务,因为我们使用的是apache2.2版本,所以默认的服务名为"Apache2.4"。

httpd -k install -n "服务名" 
将Apache注册为windows服务,自己指定一个服务名字。

httpd -k install -n "服务名" -f "conf\my.conf"将Apache注册为windows服务,自己指定一个服务名字,并且使用特定配置文件。

httpd -k uninstall
移除Apache服务,缺省地,将使用"Apache2.4"httpd -k uninstall -n "服务名"移除Apache服务,自己制定一个服务名字。

httpd -k start
启动Apache服务。

httpd -k stop
停止Apache服务。

httpd -k restart
重启Apache服务。

Add apache’s bin directory to the system environment variable, which is more convenient


As an administratorOpen the command line: Enter

httpd -k install //Add the apache service to the windows service, so open the command line as an administrator!

httpd -k start //Start the apache service
httpd -k stop //Stop the apache service
······

When I added the service here, I changed it Name, an error occurred when opening it, because it looks for the version you installed by default (mine is Apache2.4)


How to open mysql in wamp So delete the service and add it again. This time do not add the parameter -n. (Don’t change the name)

How to open mysql in wamp That’s it.

The above is the detailed content of How to open mysql in wamp. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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