1、[tiger@localhost ~]$ mysql -u root -p
Enter password: //这样应该可以进入MySQL服务器
2、mysql>GRANT ALL PRIVILEGES ON dbName.* TO test@'%' IDENTIFIED BY 'test' WITH GRANT OPTION;
--mysql>GRANT ALL PRIVILEGES ON dbName.* TO test@'%' IDENTIFIED BY 'test' ;
//赋予任何主机通过test 用户访问数据库dbName的权限
3、mysql>FLUSH PRIVILEGES
//修改生效
4、mysql>EXIT
//退出MySQL服务器
以上的这样就可以在其它任何的主机上以test身份登录啦!
客户端(windows)
c:\program files\mysql\mysql server 5.1\bin>mysql -h 192.168.48.130 -u test -p
enter password:
远程报错:
ERROR 2003(HY000):Can't connect to MySQL server on '192.168.48.130' (10065)
到linux 服务器中把防火墙添加端口tcp: 3306后就OK了。
1) 重启后生效
开启: chkconfig iptables on
关闭: chkconfig iptables off 网管联盟www.bitsCN.com
2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop 中国网管论坛bbs.bitsCN.com
需要说明的是对于Linux下的其它服务都可以用以上命令执行开启和关闭操作。 网管网bitsCN_com
在开启了防火墙时,做如下设置,开启相关端口,修改/etc/sysconfig/iptables 文件,添加以下内容:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
C:\>mysql -h 192.168.48.130 -u test -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.4.3-beta-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
分享到:
相关推荐
如果以上工作都做过还是出现: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘*.*.*.*’ (113),那就得考虑防火墙的问题了,关掉防火墙/etc/rc.d/init.d/iptables stop 修改完后需要 restart mysql (/...
对于Windows XP系统,可能存在TCP/IP连接数的限制,但Windows Server 2003及以上版本通常没有此类限制。不过,仍需关注系统整体的连接数,确保不超过其最大值。 5. **配置MySQL服务器参数**: 考虑到MySQL服务器...
Otherwise no client application can connect to the server. After you have opened the port please press [Retry] to apply the security settings. If you are re-installing after you just uninstalled the...
mysql> grant all on *.* to root@"%" identified by "123456"; Query OK, 0 rows affected (0.00 sec) ``` 3. **解决错误 1042**: - 如果遇到错误 1042,通常是因为配置文件 `/etc/my.cnf` 中的设置不正确。...
- 错误提示:`ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)` - 解决方案: - 确保MySQL服务正在运行。 - 检查端口号是否正确。 - 检查防火墙设置是否阻止了连接。 2. **权限问题:** -...
check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by "12345678"' at line 1 的错误,原因是新版本mysql版本把将创建账户和赋予权限分开了。 ...
mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.18 Copyright...
如果遇到 `ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)` 错误,可能是权限问题导致。 ```bash sudo chown -R openscanner:openscanner /var/lib/...
This should speed up operations on multiple rows with blobs * Fixed bug where connecting to a down or non-existent server would not timeout * Improved connection string handling. Now if there...
We have joined the experience of long-term successful development into one great product which provides unified access to popular databases such as Oracle, Microsoft SQL Server, MySQL, InterBase, ...
The portal server is built on top of the Java platform, leveraging its scalability, security, and portability features. #### Deployment Planning Guide Overview The **Deployment Planning Guide** is ...
With this model, any code modifications made on the server-side are immediately reflected on the client-side, ensuring seamless user experience. The SSM (Spring, SpringMVC, MyBatis) framework, a ...
Boolean flags can be turned on using the values 1, On, True or Yes. ; They can be turned off using the values 0, Off, False or No. ; An empty string can be denoted by simply not writing anything ...
The server-side processing handles the complex image processing tasks, while the client-side only requires an internet connection to view the results. This distribution of workload between the client...
to automatically resize the columns according to the text length on every refresh. * Version 1.81: o Added more include/exclude filter options in the context menu of CurrPorts. * Version 1.80: ...
You can use the dialog to navigate to each instance by double-clicking on one of the result lines... Scripting Access to the Clipboard How to access the Clipboard using the integrated scripting ...
第二个问题是`OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 61] Connection refused)")`。这个错误提示意味着你无法连接到本地的MySQL服务器。解决这个问题需要检查MySQL服务器...
For WAR/Webapp, you'll need to deploy the JIRA .war file on your chosen application server (e.g., Tomcat, WebSphere) and configure the database connection. 2.3. Setting up an External Database If ...
Codelobster PHP Edition streamlines and simplifies php development process. You don't need to keep in mind names of functions, arguments, tags and their attributes; methods etc - we've implemented it ...
Codelobster PHP Edition streamlines and simplifies php development process. You don't need to keep in mind names of functions, arguments, tags and their attributes; methods etc - we've implemented it ...