这是什么错误?怎样修复? Could not load com.mysql.jdbc.SQLError.

这是什么错误?怎样修复? Could not load com.mysql.jdbc.SQLError.,第1张

Web服务停止了,无法连接数据库,我看这些错误信息,应该是你的MySql的驱动有问题,你要把它放在lib文件下,如果用连接池 把mysql的驱动包放入到 tomcat5.x 版本的 common\lib,如果是tomcat 6.x就直接放到 lib目录下 ,的下面 这样就会好 如果用jdbc 那就放到工程下面的lib就ok了

0.客户端登陆报错

luobiaodeMacBook-Air:~ luobiao$ ssh root@39.101.204.8

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!    @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Someone could be eavesdropping on you right now (man-in-the-middle attack)!

It is also possible that a host key has just been changed.

The fingerprint for the ECDSA key sent by the remote host is

SHA256:jN2L7Ebd8ZV03ErBmMpGwHybqNBnLqOX0TTk9TbgzZs.

Please contact your system administrator.

Add correct host key in /Users/luobiao/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /Users/luobiao/.ssh/known_hosts:8

ECDSA host key for 39.101.204.8 has changed and you have requested strict checking.

Host key verification failed.

解决:

这里面,有一句很关键。

ECDSA host key for 39.101.204.8  has changed and you have requested strict checking.

Host key verification failed.

一般这个问题,是你重置过你的服务器后。你再次想访问会出现这个问题。

ssh-keygen -R  39.101.204.8 

1.安装mysql报错

mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

解决:

经过百度说是缺少 libaio.so.1  这个包.这个包是干什么的呢?

我也没查看到?试试先安装这个包。

yum -y install libaio  

安装后,解决该问题。

2.[ root @later01 /errlog ]# /etc/init.d/mysqld start 

Starting MySQL.2020-04-11T16:49:17.645735Z mysqld_safe error: log-error set to '/errlog/3306/mysql.log', however file don't exists. Create writable for user 'mysql'.

解决: 创建日志文件并赋权 

[ root @later01 /errlog/3306 ]# echo "" >mysql.log 

[ root @later01 /errlog/3306 ]# chown -R mysql.mysql /errlog/

3.2020-04-11T16:52:12.084460Z 0 [ERROR] InnoDB: The innodb_system data file './ibdata1' is of a different size 768 pages (rounded down to MB) than the 4864 pages specified in the .cnf file!

解决:注释my.cnf 中的

#innodb_data_file_path=ibdata1:76Mibdata2:100Mibdata3:100M:autoextend

1.Starting MySQL.Manager of pid-file quit without updating fi[失败]

关于这个错误原因有很多,最大的可能是没有创建测试数据库,可以用/usr/local/mysql/scripts/mysql_install_db –user=mysql命令进行创建;另外一个原因可能是权限设置问题,需要赋予mysql的data权限,可以用chmod -R 命令。

2.FATAL ERROR: Could not find /home/mysql/bin/my_print_defaults If you are using a binary release,you must run this script from

within the directory the archive extracted into. If you compiled

MySQL yourself you must run ‘make install’ first.

这个错误,是没有指明mysql的data路径导致的,可以很简单的进行解决:

vim /etc/my.cnf

在[mysqld] 后面加上路径:

basedir = /usr/local/mysql

datadir =/opt/data;

3.-bash: mysql: command not found

用mysql命令进行登陆mysql报错,原因是没有设置环境变量,需要设置,或者进入到bin目录进行登陆cd /usr/local/mysql/bin

mysql -u root

4.ERROR 1130: Host ’192.168.1.3′ is not allowed to connect to this MySQL server

用mysql远程工具链接数据库报错,这个错误原因是没有开放远程链接功能,可以在mysql里面输入如下命令进行解决:GRANT ALL PRIVILEGES ON *.* TO ’root‘@’%' IDENTIFIED BY ’password’ WITH GRANT OPTION


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/8613474.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-18
下一篇 2023-04-18

发表评论

登录后才能评论

评论列表(0条)

保存