`

Connections could not be acquired from the underly

阅读更多

"Connections could not be acquired from the underlying database" 大概意思是说:不能连接当前所配置的数据库.

出现这种问题,一般是配置参数有误.若远程连接mysql数据库的话,这时还要考虑你设置远程mysql.否则,也会出这个问题.

远程访问MySQL的设置
1.在User表中添加允许远程访问的用户

insert into mysql.user(Host,User,Password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,
Drop_priv,Reload_priv,Shutdown_priv,Process_priv,File_priv,Grant_priv,
References_priv,Index_priv,Alter_priv)
values ('url', 'username', 'password', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y','Y', 'Y');

 

然后重启mysql.

注意: 如果没有指定的固定IP地址,对应的Host设为空即可实现在任意机器上登录访问。


2.使用Grant分配权限

grant all on *.* to 'username' @'url' identified by 'password';


然后重启mysql.当前只是对指定ip进行权限分配的.还可以允许任何机器访问的.

注: 该命令与第一种方法得到的效果一模一样。username和password是连接当前数据库的用户名和密码.例如:grant all on *.* to 'root' @'192.168.0.55' identified by '123456';这意思是说允许连接数据库用户名为root,密码是123456的ip为192.168.0.55进行远程访问该数据库的增删改查操作.

 

转自:http://hi.baidu.com/kingtoon_go/blog/item/421076f042aa52c57831aa67.html

分享到:
评论

相关推荐

    有关数据库连接的问题

    ### 有关数据库连接的问题 #### 关于MyEclipse连接SQL Server 的问题 在进行Web开发时,经常需要处理与数据库的交互。对于使用MyEclipse作为集成开发环境(IDE)的开发者来说,如何顺利地连接到SQL Server数据库是...

    mysql安装失败

    win7 系统 the security settings could not be applied to the database 在安装mysql的时候,就会遇到以下错误。遇到错误不可怕,怕的就是被错误所击倒! The security settings could not be applied to the ...

    dbconfig.properties

    Connections could not be acquired from the underlying database,在正确导入所需jar包和安装合适版本的tomcat后,出现该问题,大多数是数据库连接部署,要仔细审查一下数据库配置

    mysql密码过期导致连接不上mysql

    初始为500,结果还是错误, 在修改为36000,并且加大了c3p0连接数cpool.maxPoolSize=100 这个时候出现下面错误现象2 Connections could not be acquired from the underlying database! 一直没有定位出来,靠,

    boostdesc_bgm.i,vgg_generated_48.i等.zip

    Couldn't connect to server from the Internet. Perhaps direct connections are not allowed in the current network. To use proxy please check/specify these environment variables: - ...

    微软内部资料-SQL性能优化3

    To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ...

    MyEclipse报错说明

    10. **Connections could not be acquired from the underlying database** 无法从底层数据库获取连接,这可能是由于数据库URL配置错误、网络问题或数据库服务未启动等原因造成的。检查数据库连接参数和数据库...

    weblogic 8.X 无限制

    The Server is not licensed for this operation.Connection rejected, the server license allows connections from only 5 unique IP addresses. 没有授权 提示5个IP访问的限制 解决办法: 从licensecodes.oracle...

    计算机网络第六版答案

    but the time when loss first occurs will be different from one experiment to the next due to the randomness in the emission process. 22. Five generic tasks are error control, flow control, ...

    LatticeECP3-35EAPinout

    The I/O Grouping column is used to determine the average DC current drawn by I/Os between GNDIO/VCCIO connections, or between the last GNDIO/VCCIO in an I/O bank and the end of an I/O bank. The GNDIO/...

    plsqldev12.0.3.1821x64主程序+ v12中文包+keygen

    when docking a notebook) the PL/SQL Developer Window would be restored when minimized, and the minimize button did not work Text Importer field selection list size optimized + pre-select next field ...

    KafkaOffsetMonitor监控工具2017年1月发布的版本

    Graphs could sometimes be difficult to read because you would see non-whole numbers on the y-axis legend, when facts being drawn are always whole numbers. Set y-axis to draw only whole numbers in the ...

    plsqldev13.0.3.1902x32主程序+ v12中文包+keygen

    Connecting the PL/SQL Developer main connection from the Command Window would show "Not logged on" as feedback File Dialog and Find Dialog could incorrectly show up after unlocking Windows An error ...

    Java邮件开发Fundamentals of the JavaMail API

    be acquired by the user(s) through POP or IMAP. This does not require your SMTP server to be an open relay, as authentication is supported, but it is your responsibility to ensure the SMTP server is...

    plsqldev14.0.0.1961x32多语言版+sn.rar

    32位版本的 PLSQL 正式版。 安装请查看说明。 APRIL 17, 2020 - VERSION 14.0 RELEASED Built-in Version Control support for Git and ...DBMS_Jobs could not be edited on Oracle19 (‘xxxx’ is not a valid

    plsqldev14.0.0.1961x64多语言版+sn.rar

    You can now define Session Actions that can be performed from the popup menu of the session list: Session Actions can display feedback by writing dbms_output. Other enhancements Function keys have ...

    plsqldev13.0.3.1902x64主程序+ v12中文包+keygen

    Connecting the PL/SQL Developer main connection from the Command Window would show "Not logged on" as feedback File Dialog and Find Dialog could incorrectly show up after unlocking Windows An error ...

    Alwayson安装配置文档

    Alter availability group [test_alwayson] Modify replica on ‘yg-190’ with(secondary_role(allow_connections=all)); Alter availability group [test_alwayson] Modify replica on ‘yg-190’ with (secondary...

    a project model for the FreeBSD Project.7z

    This, combined with the vast amount of dependencies in the kernel and that it is not easy to see all the consequences of a kernel change, demands developers with a relative full understanding of the ...

Global site tag (gtag.js) - Google Analytics