PDA

View Full Version : sql problems


jep
11-13-2003, 03:05 PM
Hi,

I just installed my first directadmin: great! I already love it (way more then i did with plesk)

One problem. When logged in as a user/admin/whatever i want to manage sql databases but I see the error:


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


I think there's a wrong password in mysql.conf because i installed directadmin 4 times :P :p

How can i reset/change the password for this database?

Another thing: when i click phpmyadmin on the same page, i see a 404 error.. This is just http://hostnamefromserver/phpMyAdmin

Any clue? Thanks guys!

ProWebUK
11-13-2003, 08:21 PM
ensure mysql is running

ProWebUK
11-13-2003, 08:23 PM
Try http://IP/phpMyAdmin instaed of hostname, you may need to add an A record for the hostname against the main server IP for the hostname to work, although if that was the case you shouldnt get a 404, instaed there should be a cannot 'cannot find server' error.

Chris

DirectAdmin Support
11-14-2003, 12:37 AM
Hello,

If you've installed DA 4 times, then something is bound to have gotten messed up.. :) Try this:

cd /usr/local/directadmin/scripts
./mysql.sh <mysqlrootpass> da_admin <da_adminpass>

You can make up whatever passwords you want for <mysqlrootpass> and <da_adminpass> as they'll be used during the install. Be sure to select "y" when it asks to destroy your current data so that it will delete /var/lib/mysql. This allows a clean install for it to be able to login as root, create the required users and setup the passwords.

John

jep
11-16-2003, 08:13 AM
Hi,

The SQL-password problem is solved, thanks for what.

The phpmyadmin still doesn't work, i get a 404 when i use http://hostname/phpMyAdmin by using DA, and the same by using the ip instead of the hostname.

Anybody some clue? :)

Yes I made some databases..

ProWebUK
11-16-2003, 08:18 AM
weird.

try https:// although I cant see it working unless something has been modified, its possible... if that fails, if you wish PM, me your IP and i will try a couple of URLs

jep
11-16-2003, 08:35 AM
I did some research, and only http://80.247.xx.xx/phpMyAdmin-2.5.4/ works ;). Not from DA itself, or whatever.

ProWebUK
11-16-2003, 08:39 AM
Ok just checked the link you provided me with, and the message above. I think the quickest and easiest solution would be to rename the folder (i think that may be causing the problem)

locate phpMyAdmin-2.5.4

(get the path)

mv /path/to/phpMyAdmin-2.5.4/ /path/to/phpMyAdmin/

Chris

jep
11-16-2003, 09:21 AM
Ok, but then again.. i still can't use Phpmyadmin in DA. I have to finish this config for a dedicated server client, he will like it if it works :P:P

Thanks..

ProWebUK
11-16-2003, 09:24 AM
WAS phpMyAdmin working in directadmin previously?

jep
11-16-2003, 09:25 AM
Nope, and I installed DA for the first time 3 days ago.

ProWebUK
11-16-2003, 09:33 AM
Originally posted by jep
Ok, but then again.. i still can't use Phpmyadmin in DA. I have to finish this config for a dedicated server client, he will like it if it works :P:P

Thanks..

this has done more than confuse me :p

Did you move the phpMyAdmin folder as stated in my other post?

It looks like the phpMyAdmin installation went into a wrong loation, and thats the fix...... if you chnage that directory you should be able to access it via http://IP/phpMyAdmin AND http://domain.com/phpMyAdmin.... and im assuming DA has nothing to do with MyAdmin apart from the link to it.

Chris

jep
11-16-2003, 09:38 AM
But, that means that i have to move phpMyAdmin to every public_html folder? :P I supposed that it was a link to a central phpmyadmin somewhere?

ProWebUK
11-16-2003, 09:41 AM
nooo...... the /phpmyadmin i believe is a link..... if you rename the folder to phpMyAdmin that will be your central phpMyAdmin used by domain.com/phpMyAdmin.

If it fails you can always rename the file back with the same command with the paths swapped around.... im 99.9% certain DA uses MySQL itself to setup databases etc.... phpmyadmin is just the user interface and totally seperate.


Chris

jep
11-16-2003, 09:44 AM
I know, but i still want to provide PHPmyadmin to my clients :P:P

The rename won't do the trick, since http://www.domain.nl/phpMyAdmin-2.5.4/ did not work. ;) Do you get it? :P

ProWebUK
11-16-2003, 09:47 AM
Originally posted by jep
The rename won't do the trick, since http://www.domain.nl/phpMyAdmin-2.5.4/ did not work. ;) Do you get it? :P

Have you tried the rename? if not i will put my money on saying that it works. Just try it! you have nothing to loose!

http://www.domain.nl/phpMyAdmin-2.5.4/ is not setup by DA to be a redirect, http://www.domain.nl/phpMyAdmin/, however is.

Chris

jep
11-16-2003, 09:52 AM
Originally posted by ProWebUK
Have you tried the rename? if not i will put my money on saying that it works. Just try it! you have nothing to loose!

How much money? :P

http://www.domain.nl/phpMyAdmin-2.5.4/ is not setup by DA to be a redirect, http://www.domain.nl/phpMyAdmin/, however is.

Chris
True, but now i'm not talking about the link in DA, but just accesing it from somewhere. After my rename it's reachable on http://ip.adr.es.here/phpMyAdmin, but still not on http://www.hostnameinDA.com/phpMyAdmin, so the phpMyAdmin link is still a 404 error.

ProWebUK
11-16-2003, 10:03 AM
http://hostname.com/phpMyAdmin/ (if your hostname has an A record)
http://YOUR_IP/phpMyAdmin/
http://domain_in_da.com/phpMyAdmin/

should all work, however, if your central phpmyadmin is NOT /phpMyAdmin, but instead phpMyAdmin-2.5.4, the first 2:

http://hostname.com/phpMyAdmin-2.5.4/ (if your hostname has an A record)
http://YOUR_IP/phpMyAdmin-2.5.4/


will both work;

http://domain_in_da.com/phpMyAdmin-2.5.4/

However, will not.

If you are worried about renaming the folder, make a copy and leave your previous version there, instaed of 'mv' in my post use 'cp'

Im certain that will work and fix all of your sql problems.

Chris

ProWebUK
11-16-2003, 10:05 AM
Originally posted by jep
How much money? :P

you realise im doing this for free now dont you?! :D

ProWebUK
11-16-2003, 10:30 AM
Did you try the moving / copying files? if so did it work?

Chris

jep
11-16-2003, 11:42 AM
Strange, stranger: strangest. :P

Some code..


[root@jongerenweb html]# ls -l | grep php
drwxr-xr-x 7 root root 4096 Nov 16 16:34 phpMyAdmin
[root@jongerenweb html]# pwd
/var/www/html
[root@jongerenweb html]# lynx http://localhost/ --dump

Apache is functioning normally

[root@jongerenweb html]# lynx http://localhost/phpMyAdmin --dump

Not Found

The requested URL /phpMyAdmin was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
_________________________________________________________________


Apache/1.3.29 Server at localhost Port 80
[root@jongerenweb html]#

ProWebUK
11-16-2003, 11:57 AM
Originally posted by jep
http://localhost/phpMyAdmin[/url] --dump

Not Found

The requested URL /phpMyAdmin was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
_________________________________________________________________


Apache/1.3.29 Server at localhost Port 80


Quite simply, its telling you what we already knew, the phpMyAdmin file does not exist, its named phpMyAdmin-2.5.4 instead.... from that i'm assuming you have not renamed the files?

jep
11-16-2003, 12:01 PM
Originally posted by ProWebUK
Quite simply, its telling you what we already knew, the phpMyAdmin file does not exist, its named phpMyAdmin-2.5.4 instead.... from that i'm assuming you have not renamed the files?
Hehe, i did.. when you asked me to.


[root@jongerenweb html]# ls -l | grep php
drwxr-xr-x 7 root root 4096 Nov 16 16:34 phpMyAdmin
[root@jongerenweb html]# pwd
/var/www/html


First it was phpMyAdmin-2.5.4, now i renamed it to phpMyadmin.

Thanks for your help btw :)

ProWebUK
11-16-2003, 12:05 PM
so you currently have a phpMyAdmin folder named phpMyAdmin?

jep
11-16-2003, 12:38 PM
Yes, as you can see. It looks like there's some wrong apache setting. There should be a /phpMyAdmin/ redirection to the /var/www/html/phpMyAdmin. ;)

DirectAdmin Support
11-16-2003, 01:04 PM
Hello,

There is an alias in the /etc/httpd/conf/httpd.conf that points

/phpMyAdmin -> /var/www/html/phpMyAdmin-2.5.4

.... so if you've also got a directory named "phpMyAdmin" the directory should be renamed to include the version #. We set it up to point to a directory named phpMyAdmin-2.5.4, not phpMyAdmin.. perhaps that is causing it.

John

jep
11-16-2003, 01:05 PM
I guess we found a bug, folks! :P

Alias /phpMyAdmin /var/www/html/phpMyAdmin-2.5.0/
Alias /phpmyadmin /var/www/html/phpMyAdmin-2.5.0/


It's pointing to an old release :p

jep
11-16-2003, 01:06 PM
Now I restart Apache and i get the same error as always:

[root@jongerenweb portal]# apachectl start
Syntax error on line 1505 of /etc/httpd/conf/httpd.conf:
Invalid command 'SSLCertificateFile', perhaps mis-spelled or defined by a module not included in the server configuration
/usr/sbin/apachectl start: httpd could not be started

ProWebUK
11-16-2003, 01:07 PM
So i was wrong in thinking that...... didn't think DA would do anything with phpmyadmin apart from setup the redirects....

Chris

jep
11-16-2003, 01:18 PM
The redirects where wrong :P

ProWebUK
11-16-2003, 01:26 PM
not my day today, found an identical problem fixed within 4 posts and I had even replied to it!

http://www.directadmin.com/forum/showthread.php?s=&threadid=1064

jep
11-16-2003, 01:35 PM
Not my day either, I should have been able to find that one myself :P