Archive for the “MySQL” Category

Plesk: saved admin password error

Service is not available now, probably your Plesk is misconfigured.

Contact Your provider for details.

Internal Plesk error occurred: Unable to connect to database: saved admin password is incorrect.

————

Fix

———–

you will need to edit the mysql config file

add skip-grant-tables under mysqld

/etc/my.cnf

then restart mysql

connect to the mysql db

issue the following command

UPDATE mysql.user SET Password=PASSWORD('new_pwd') WHERE User='admin';

then

FLUSH PRIVILEGES;

exit mysql ,

remove the skip-grant-tables from the mysqld config

restart mysql

*also very the password matches /etc/psa/.psa.shadow

cat /etc/psa/.psa.shadow

Reference

November 10, 2008 Posted Under: MySQL   Read More

Mysql: handling null values during a insert

Example of inserting null values/string is as follows
null columns for testing purpose
test1 and test2

INSERT INTO reguser_active (test1, test2) values (”,”);

” tells mysql to insert a empty string into the column , you may also insert a
null value into the not null column as such

INSERT INTO reguser_active (test1, test2) values (‘null’,'null’);

and lastly you can modified your columns to allow null values.

Reference sites

http://dev.mysql.com/doc/refman/5.0/en/problems-with-null.html

http://dev.mysql.com/doc/refman/5.0/en/insert.html

October 6, 2008 Posted Under: MySQL   Read More

SugarCRM: mysql error

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

PHP Safe mode must be off .., duh

September 27, 2008 Posted Under: MySQL   Read More

Mysql – error lookup

if you check the mysql logs and see a error code such as error 24

you can lookup the code by using the perror command

perror 24

August 17, 2008 Posted Under: MySQL   Read More

Horde: DB connection error

A fatal error has occurred
DB Error: connect failed
Details have been logged for the administrator

create a symlink to the mysql.sock from the /tmp/ folder example
cd /tmp
ln -s /usr/local/lib/mysql.sock mysql.sock

August 10, 2008 Posted Under: MySQL   Read More