Download “Connector/J” a mysql-java-connector archive from Mysql download page.
Once you have extracted the distribution archive, you can install the driver by
placing mysql-connector-java-[version]-bin.jar in your classpath, either by adding the full path to it to your CLASSPATH environment variable,If you are going to use the driver with the JDBC DriverManager, you would use com.mysql.jdbc.Driver as the class that implements java.sql.Driver.
You can set the CLASSPATH environment variable under UNIX, Linux or Mac OS X either locally for a user within their .profile,
.login or other login file. You can also set it globally by editing the global /etc/profile file.
For example, under a C shell (csh, tcsh) you would add the Connector/J driver to your CLASSPATH using the following:
shell> setenv CLASSPATH /path/mysql-connector-java-[ver]-bin.jar:$CLASSPATH
with a Bourne-compatible shell (sh, ksh, bash):
shell> export set CLASSPATH=/path/mysql-connector-java-[ver]-bin.jar:$CLASSPATH
Within Windows 2000, Windows XP, Windows Server 2003 and Windows Vista, you must set the environment variable through the System Control Panel
- You need to edit the following three repository files:
- Now un-comment all the lines that start with the term baseurl and place a comment before all lines that start with mirrorlist. This should be done for both the above files.
- Now edit your /etc/hosts file and append(copy & paste) the following to it’s contents:
22.214.171.124 mirrors.fedoraproject.org 126.96.36.199 mirrors.rpmfusion.org
Now try updating your system or installing any software via Yum. You will see, the error is now resolved and the error message is not shown anymore.
sudo yum -y update