1. 查看数据库实体文件存放路径:
show variables like '%datadir%';
2. 恶心的八小时问题(重启电脑后又要重新修改):
set global wait_timeout=288000;
set global interactive_time=288000;
show global variables like 'wait_timeout';
或者更改配置文件my.ini [mysqld] wait_timeout=31536000 interactive_timeout=31536000
3. 数据库连接池:
<Resource name="jdbc/hzm" auth="Container" autoReconnectForPools="true" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/db_rent?autoReconnect=true" username="root" password="root" logAbandoned="true" maxActive="2000" maxIdle="5" maxWait="5000" />
4. mysql command line client打不开
修改mysql安装路径下\MySQL Server 5.5\my-small.ini 为my.ini