`

2003 can't connection to mysql server on 10065

阅读更多

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>

分享到:
评论

相关推荐

    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-8.0.20-macos10.15-x86_64.tar.gz

    check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by "12345678"' at line 1 的错误,原因是新版本mysql版本把将创建账户和赋予权限分开了。 ...

    PHP and MySQL Web Devepopment 4th Edition.pdf

    each of the two facilities would typically be configured to act as its own site since the computers within the facility are on a common LAN, but there is no LAN connection between the facilities....

    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...

    ByteFX.MySqlClient.76.NI

    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...

    unidac+3.0.010 各种数据库连接

    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, ...

    php.ini-development

    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 ...

    端口查看工具

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

    UE(官方下载)

    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 ...

    游戏网站PHPMysql设计和实现--计算机专业.doc

    so the state of the database is very important.In this article, the Mysql database server is selected as the back-end database, which facilitates the close connection between the Web and the database...

    CodeLobster.PHP.Edition.Pro.4.3.2

    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_Pro_4.1.0

    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 Pro 4.0.1

    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 ...

    VB编程资源大全(英文源码 数据库)

    It is handy in studying database programming.<END><br>20 , MySQLExplorer.zip Explorer for MySQL Data Base.You can retrieve and execute your query. <END><br>21 , ICDBaseSource115.zip DAO based ...

    UniDAC 7.1.4

    UniDAC can work with such servers as Oracle, Microsoft SQL Server, MySQL, Interbase, Firebird. The UniDAC library is designed to help programmers develop faster and cleaner cross-database ...

    Delphi7.1 Update

    * TClientDataSet doesn‘t save data to file when FileName is set and there is no existing file on disk (Quality Central 2307). * Using the Delphi 7 version of midas.dll to open an XML file that was ...

    ZeosDBO

    The following compilers are supported: Delphi 5 - 7C++ Builder 5 - 6Kylix 2 - 3ZeosDBO supports direct connectivity to the following databases using the vendor provided, native interface: MySQL 3.20 ...

    vim数据库插件dbext_420

    - Added new option, dbext_default_MYSQL_version, for MySQL to indicate the version you using. - You can optionally define a function, DBextPostResult, in your .vimrc, this function will be called ...

    Beginning Python (2005).pdf

    Try It Out: Data Storage in MySQL 439 Try It Out: Storing and Retrieving Documents 441 Try It Out: A Document Retention Framework 446 The python-ldap Module 448 Try It Out: Using Basic OpenLDAP ...

    jpivot学习总结.doc

    1. jpivot加入其它应用中 解压jpivot.war 文件,在你的应用当中你需要下面的这些文件:... jdbcUrl="jdbc:mysql://localhost/foodmart" catalogUri="/WEB-INF/test/FoodMart.xml"> select {[Measures].[Unit Sales]...

Global site tag (gtag.js) - Google Analytics