November 28, 2008

SugarCRM Errors Out (MySQL Error 1064) After Installation

After a fresh installation of SugarCRM on a test CentOS 5 box, I received the following error with a blank white screen typical of a PHP or die() statement.

Query Failed: AND users.id = '1'::MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND users.id = '1'' at line 1

To fix it, simply turn off PHP Safe Mode in the php.ini file that is usually located in the /etc directory. Issue a service httpd restart and you should be good to go.

November 20, 2008

Adding A User In MySQL

Do you need to quickly add a specific user with access to only a certain table? Issue this command as a root or admin user:

GRANT ALL ON testdb.* TO 'testuser'@'localhost' IDENTIFIED BY 'pass1';

You can also limit user’s privileges to specific ip addresses or domains in case you need to access your databases from a different host.

GRANT ALL ON *.* TO 'testuser'@'remote.farmsoftstudios.com' IDENTIFIED BY 'pass1';

November 17, 2008

Find The Version Of CentOS/RHEL Without Rebooting

Want to know if you have CentOS 4.5 or 5.0? Issue this command:
cat /etc/redhat-release
That file contains the needed version information.

[root@localhost ~]# cat /etc/redhat-release
CentOS release 5 (Final)