|
|
MySql局域网连接慢的解决方法
skip-name-resolve
局域网连接不上,方法:登录连接机器的mysql运行
grant all on *.* to root@"%" identified by "root"
再次连接
步骤:
1. 下载免安装Mysql版本,官方网站地址http://www.mysql.cn/。
2. 当然是解压,然后进入根目录(比如我的是“H:\mysql\mysql-5.0.45-win32”),再进入bin目录,之后~~~
a) H:\mysql\mysql-5.0.45-win32\bin>mysqld-nt install
=》Service successfully installed.
b) H:\mysql\mysql-5.0.45-win32\bin>net start mysql
=》MySQL 服务正在启动。
=》MySQL 服务无法启动。
=》系统出错。
=》发生系统错误 1067。
=》进程意外终止。
原因是在C:\WINDOWS下(win2000系统为winnt)缺少my.int文件。创建my.int文件如下(注意路径别搞错了,改成你自己的):
[mysqld]
# set basedir to your installation path
basedir=H:/mysql/mysql-5.0.45-win32
# set datadir to the *** of your data directory
datadir=H:/mysql/mysql-5.0.45-win32/data
[WinMySQLAdmin]
Server=H:/mysql/mysql-5.0.45-win32/bin/mysqld-nt.exe
这次,再运行一遍:
H:\mysql\mysql-5.0.45-win32\bin>net start mysql
=》 MySQL 服务正在启动 .
=》 MySQL 服务已经启动成功。
c) 用root用户登陆,缺省密码为空:
H:\mysql\mysql-5.0.45-win32\bin>mysql -u root -p
=》 Enter password:
=》 Welcome to the MySQL monitor. Commands end with ; or \g.
=》 Your MySQL connection id is 1
=》 Server version: 5.0.45-community-nt MySQL Community Edition (GPL)
=》 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
=》 mysql>
3. 接下来你就可以为所欲为了,建表啊啥的,具体操作请参考Mysql用户手册。
4. 关于退出:
mysql> exit
=》 Bye
H:\mysql\mysql-5.0.45-win32\bin>net stop mysql
=》 MySQL 服务正在停止..
=》 MySQL 服务已成功停止。
H:\mysql\mysql-5.0.45-win32\bin>mysqld-nt remove
=》 Service successfully removed. |
|