Skip to content
WJunction - Webmaster Forum

Direct Admin + Mysql + 2002 Error

Status
Not open for further replies.
I just spent an hour on this and post this here as a reference so if someone needs or myself..

OS: Deb Lenny

Error was 2002 Mysql cannot connect.

What i did.

/etc/mysql/my.cnf rename it to my.cnf.bk

then /etc/init.d/mysqld start

once there the mysql server started but needed a new password for root.

Next you execute

Code:
mysql --user=`grep "^user=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --password=`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`

use mysql;
UPDATE user SET password=PASSWORD('newpass') WHERE user='root';
FLUSH PRIVILEGES;
quit

And you're good to go..

I guess.. :)
 
Status
Not open for further replies.

About the author

E
Active Member · Joined
Where...ZZ
754
Messages
4
Reactions
18
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom