SQL safe mode in effect errors

Sql.safe mode Errors

If you have any mysql connection errors and received error with cpanel user name authentication errors. If sql.safe_mode is enabled, mysql_connect() and mysql_pconnect() ignore any arguments passed to them. Instead, PHP attempts to connect using the following details:

host: local host
user: the user PHP runs as
password: an empty string (“”)

For example,

Notice: SQL safe mode in effect – ignoring host/user/password information in

mysql_connect(): SQL safe mode in effect – ignoring host/user/password information in

This is caused due to your php.ini sql safe mode settings.

Login your php.ini file.

vi /usr/local/lib/php.ini

and turn off sql.safe mode.

sql.safe_mode  = Off

Restart apache

/etc/init.d/httpd restart


Thats all!!

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Replace MySQL with MariaDB in cPanel

MariaDB strives to be the logical choice for database professionals looking for a robust,...

Test MySQL database connection with php script

You can use the following php script which is used to test mysql database connection on your...

cPanel Log file locations

cPanel log file locations and Basic troubleshooting, most activity that happens on a server to...

MySQL downgrade on cPanel server

You know downgrades are not recommended, it’s always best to stick with a newer version and work...

How to repair corrupted mysql database

Sometimes it happens that your database get corrupted due to many reason like it does not get...

Powered by WHMCompleteSolution