SQL Nightmare :)

chibi

Verified User
Joined
Apr 26, 2005
Messages
18
Location
Canada
Hi hi,

Bought a server 2 days ago with Direct Admin as my control panel. I've been hunched over my keyboard for awhile now making the move from my webhost (who took care of me) to this server (which I have to take care of).

I finally got my dns working fine, and my domain works too. Now my main concern is moving my forum and the database over. I made copies and backups and all that.

I am using phpBB and what I tried to do was just, fresh install it onto my server first and then worry about restoring it later.

In DA, under User Level, I went to 'MySQL Management' and created a new database:

admin_bbs
admin_me
mypassw (diff than my DA login passwd)

Created successfully, I clicked on it and modified the priviledges. They all say yes now. Okay so I thought I was all set. The phpBB files were uploaded, and I began the install process; filling in the following:

- For database type I chose mysql 4, since I checked and thats what DA uses.
- Database Server Hostname / DSN: mydomain.com (tried localhost too..is that appropriate?)
- Your Database Name: admin_bbs
- Database Username: admin_me
- Database Password: mypassw

Looks right to me, I just made that database and that is the info. I fill in the rest of the stuff like port 80 and my dir name etc..then click INSTALL and receive:

Warning: mysql_connect(): Access denied for user: '[email protected]' (Using password: YES) in /home/admin/domains/mydomain.com/public_html/bbs/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/admin/domains/mydomain.com/public_html/bbs/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/admin/domains/mydomain.com/public_html/bbs/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database

So that is what I end up with. Please note '[email protected]' is the name of my host who I bought my server from (I changed their name for this post).

I am not sure if that is a clue or not..if I goto Admin Level and click on 'Administrator Settings' .. all the entries in there are specific to my host, and not my domains. Should I be changing this? Could this be apart of the problem?

Okay so trying to figure this out, I came here and searched around a bit... and I found this post:

http://www.directadmin.com/forum/showthread.php?s=&threadid=2019&highlight=setup+mysql

Some of it did not really make sense to me, but I did mention this file:

/usr/local/directadmin/scripts/setup.txt (and inside there was the sql username (da_admin) and pass (mysqlpassw)

So if I try to use these settings to install phpBB:

- Database Server Hostname / DSN: mydomain.com
- Your Database Name: admin_bbs
- Database Username: da_admin
- Database Password: mysqlpassw

I end up with less error:

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/admin/domains/mydomain.com/public_html/bbs/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/admin/domains/mydomain.com/public_html/bbs/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database

Also on that post it talked about the phpMyAdmin. I did log into it using my DA admin user/pass. Inside the database I have made appears in the dropdown list on the left. Not sure if this helps.

Would any of you be able to help me figure this out? I am sorry I wrote so much.. I have the habit of scaring people away with too many details.. they dont want to read it. I am only trying to be informative so you can better determine a resolution :)

Thank you so much for your help!

-Jeff
 
Last edited:
Jeff

- Try to use mySQL server as localhost.
- username/password: using the ones you created at User level

Also, you dont need to install a new forum. Make backup from the old server, and move to the new one. You can restore mySQL DB there by command

mysql -uUsername -pPassword -Ddatabase < /path/file.sql

Of course, you still need to create DB, username, password in DA, at User level first
 
Well, I wanted to make sure sql worked before anything else. No sense trying to restore it from backups n things if sql was messed.

I dont know what I did but now when I login to my control panel for SQL, the databases are gone and it says:

Error connecting to MySQL: Access denied for user: 'da_admin@localhost' (Using password: YES)

So I followed the instructions at:

http://help.directadmin.com/item.php?id=45

And I got through them okay but I go back to the panel and the error is still there, it did not go away :\ So now I am completely lost..

If i do the mysql -uroot -p command it accepts the new password I made and everything..

Anyways, gate2vn, when I originally tried to install phpBB I used localhost, and admin_bbs and the password I created with it.

This is very messy I might have to email support on this one.
 
Problem has been fixed. I emailed support and John helped me, and very proficiently I must say.

Thank you !
 
Back
Top