Tag Archives: MySQL


Change the Max File Upload Size for PhpMyAdmin in Plesk

In some cases, we need to restore  big databases using phpmyadmin. In that cases, we need to increase the upload limit in phpmyadmin to accomplish this.

Change the values (to the required value) “upload_max_filesize” & “post_max_size” in the file “/usr/local/psa/admin/conf/php.ini”

And restart the apache, here plesk service providing the apache for phpmyadmin, so restart psa.

/etc/init.d/psa stop

/etc/init.d/psa start

Now you can restore bigger databases from phpmyadmin



[ERROR] /usr/sbin/mysqld: Can’t open file


I got this error while migrating  huge amount of accounts from one cpanel server to  another.

[ERROR] /usr/sbin/mysqld: Can’t open file: ‘./dbname/tablename.frm’ (errno: 24)

errno: 24 means there is too many open files.  There is a mysql variable named “open_files_limit"  which shows how many open files are allowed in mysql by default. We cannot update this valuse using “Set”  command as this variable is a read only variable.

Continue reading


mysqli_connect(): (HY000/2002): Can’t connect to local MySQL server through socket – SugarCRM – cron.php

PHP Warning: mysqli_connect(): (HY000/2002): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in sugarcrm/include/database/MysqliManager.php on line

We have faced such an error with SugarCRM today. The above error was reporting in error_log file every time the cron.php is executed via cron job. We have taken a closer look and couldn’t find any real reason why it cannot connect via MySQL socket. Everything looks good and every testing via command line were giving good results. What we have checked is for the existence of the socket file ( the errors 2 states it canbot find the sock file ) and whether running the cron as user from command line can return the error. If it is cPanel system, all cron jobs are running in a Jailed shell from version 11.38. Make sure it is disabled, as it can cause this issue. We have find many similar threads in INTERNET, but  could not find any real reason which can cause it. Finally we have decided to go ahead and force it to use TCP connection rather than using MySQL socket file. To do that we have edited config.php and changed the value of db_host_name parameter to “” from “localhost. That fixed the issue and the error is not reporting so far. It may slow down MySQL connection a bit, as using socket file is stated to be the faster method.