本文目录一览:
没有MYSQL服务
你不是服务器,那么你的程序应该修改,修改里面的localhost为服务器的地址。
现在报错,是因为程序把你自己的机器当成服务器进行链接,结果失败,如果不把你的机器安装为服务器的话,就只有修改程序链接正确的服务器(而不是本机)。
你的机器没有MySQL服务,是因为你的机器不是服务器,当然也可以安装MySQL以及游戏配套的程序,把本机变为服务器。
MySql的服务没有了,怎么办?
你安装了mysql没有,没有就先安装,安装好mysql以后,在bin目录下有个mysqld.exe,运行这个程序就可以添加mysql服务,但是运行这个程序需要使用参数,否则就会以命令行窗口形式启动mysql数据库,命令参数如下:
安装服务(mysql)的命令:
mysqld.exe
--install
可以指定服务的名字,例如:
mysqld.exe
--install
mysql5
以上命令安装的服务是开机自动运行,如果开机不自动启动,那么参数如下:
mysqld.exe
--install-manual
这样就需要使用下面的命令启动服务:
net
start
mysql
删除服务的命令是:
mysqld.exe
--remove
wampserver的mySQL一进入控制台输入密码后自动消失
密码输入错误,所以mysql闪退。我之前输入root密码,闪退,然后我试试不输入密码,成功登入
MYSQL启动服务时候一闪就没有了
解决办法:
1、碰到这种情况,找到my.ini配置文件
2、找到这一部分
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup option
# "--defaults-file".
#
# To run run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="c:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQLXY --defaults-file="c:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQLXY
#
#
# Guildlines for editing this file
3、如果My.ini实际是在D盘,则将C:改为D: 如下
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup option
# "--defaults-file".
#
# To run run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="d:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQLXY --defaults-file="d:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQLXY
#
#
# Guildlines for editing this file