If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > problem connecting to database after installing direct admin. Newbie please help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-29-04, 13:25
Dado Dado is offline
Registered User
 
Join Date: Oct 2004
Posts: 1
problem connecting to database after installing direct admin. Newbie please help

Once in a while the forum will go down and it will say cannot connect to database. I think I have found the fix but I can't run the commands to update the permissions. On the direct admin website I found this.



Quote:
When connecting to the MySQL screens in DirectAdmin, if this error appears, that would indicated that the "da_admin" user has not been setup correctly. To resolve this do the following.

1) Make sure the root mysql password works. If you know it, skip to 2). The mysql root password can be found in the /usr/local/directadmin/scripts/setup.txt if it has not been deleted. It's under the header "mysql=". If it cannot be found, then mysqld will have to be restarted with the --skip-grant-tables option:
service mysqld stop (Redhat)
mysqld_safe --skip-grant-tables &

That should start up mysql without the need for a root password. Once in, type
use mysql
UPDATE user SET password=PASSWORD('newpass') WHERE user='root';
FLUSH PRIVILEGS;
quit

That will reset the root password for you.

Type "kilall -9 mysqld_safe; killall -9 mysqld" to shut down mysqld.
Start it up again with
/sbin/service mysqld start



2) Once the root mysql password is set and known, then you can begin the process of resetting the da_admin mysql user. Type:
mysql -uroot -p

Then press enter. You'll be asked for the password. Once in mysql, type:
GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY 'newdapass' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit

That should set the password for da_admin in mysql.

3) Now we need to make sure it's setup correctly for DA to use. Edit /usr/local/directadmin/conf/mysql.conf and set
user=da_admin
passwd=newdapass


The problem is that none of those commands will run on my box. I am running freebsd so I guess the commands are different. For now to fix this issue and have the forum working I run this command but it's not safe because the database is open for everyone.

kill `cat /home/mysql/35111.pid`
mysqld_safe --skip-grant-tables &

Thank you.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On