Error 1918 while Installing MySQL ODBC Driver on Windows

Had to install MySQL ODBC Driver on Windows when I was trying to use SSMA to convert a MySQL DB to Microsoft SQL. When I tried to install the driver, I got the below error and was completely puzzled. I finally found the fix..

Error 1918. Error installing ODBC driver MySQL ODBC
5.3 ANSI Driver, ODBC error 13: The setup routines for
the MySQL ODBC 5.3 ANSI Driver ODBC driver could
not be loaded due to system error code 126: The
specified module could not be found. …\myodbc5S.dll…

MySQL ODBC Error 1918

Continue reading “Error 1918 while Installing MySQL ODBC Driver on Windows”

MySQL – Too many files open

I run my servers on CentOS using cPanel/WHM. When I first started running my own server, it did not take long for me to see how little I know about Linux. I had a funky problem with my MySQL dropping out after so much time. It seemed like the more people I had on my sites, the faster it would go down. But after I rebooted the server, it all started working fine again… For a while anyway.

I got to looking around to see if there is a error log for MySQL. And sure enough there is. By default, the error log is located at:

/var/lib/mysql/**HOSTNAME**.err

The **HOSTNAME** would be your server’s hostname, (if you do not know your hostname, simply use the command “hostname” and it will output your hostname)

To view the last 500 lines of your error log, simply use:

tail -500 /var/lib/mysql/**HOSTNAME**.err

In my error log, I began to see this:

130925 12:39:23 [ERROR] Error in accept: Too many open files
130925 12:43:39 [ERROR] Error in accept: Too many open files
130925 12:47:55 [ERROR] Error in accept: Too many open files
130925 12:52:11 [ERROR] Error in accept: Too many open files
130925 12:56:27 [ERROR] Error in accept: Too many open files
130925 13:00:43 [ERROR] Error in accept: Too many open files
130925 13:04:59 [ERROR] Error in accept: Too many open files
130925 13:09:15 [ERROR] Error in accept: Too many open files
130925 13:13:31 [ERROR] Error in accept: Too many open files
130925 13:17:47 [ERROR] Error in accept: Too many open files
130925 13:22:03 [ERROR] Error in accept: Too many open files
130925 13:26:19 [ERROR] Error in accept: Too many open files
130925 13:30:35 [ERROR] Error in accept: Too many open files

 

Did a little bit of googling, and discovered that by default, centOS has a hard limit of the amount of files that can be opened at a time, which causes MySQL to error out until you reboot the server. However, this can be fixed by running the doing the following:

nano /etc/sysctl.conf

Add this line at the bottom of the config file:

fs.file-max = 100000

 

Save and close the file, then reboot the server.

After you rebbot your server, you will want to run the following command to verify that your settings was saved and correct:

sysctl fs.file-max

If it reads 10000, then your server is now ready to handle MySQL!