MySQL login problem from Shell as Root

R-J

Verified User
Joined
Dec 31, 2003
Messages
8
Location
Haarlem, Holland
I'm having this strange problem, when connected to my own server using SSH I'm trying to connect to the mysql deamon without any succes so far.

these commands give the desired results
> mysql -u root -p *****
> mysql -h localhost -u root -p *****
> mysql -u root -p ***** test
> mysql -h localhost -u root -p ***** test
> mysqladmin -u root -p *****
> mysqladmin -h localhost -u root -p *****
> mysqladmin -u root -p ***** ver
> mysqladmin -h localhost -u root -p ***** ver

have tried it with a couple of other db accounts too that are listed in the mysql users table.

The weird thing that keeps happening, after the above commands are entered and I press enter, I'm asked to enter my password (makes sense). But when I enter the correct password the response is "command not understood" or "the database ***** could not be found", where ***** is exactly the same as the password I've entered.

When I enter an incorrect password, the response from the mysql server is that the password is incorrect :rolleyes:

Is there somekind of config setting that doesn't allow me to login from the shell?

I'm using MySQL 4.0.14, Red Hat Linux 7.3 and the latest version of DA.
 
"root" is a non-existant database user on DirectAdmin machines. The "root" username is actually da_admin. Give that a shot :).
 
Hello,

The root mysql password is setup as a random password when DA is installed. The value of the password is stored in /usr/local/directadmin/scripts/setup.txt, which can be deleted. Failing that, you can always log in as the values stored in /usr/local/directadmin/conf/mysql.conf and then change the root password from within mysql.

John
 
Hi John,

Can you explain the da_admin user? Does MySQL root exist on DA servers? And what's in /usr/local/directadmin/conf/mysql.conf?

I'm a little confused :)

Thanks,
Matt :)
 
Hello,

The da_admin user is estentially another root user. You should have both root and da_admin users for mysql.

The mysql.conf holds the long/pass that DA uses to acces mysql. It's assumed that the user specified has root access on the databases so that it can create/remove anything it needs to. You should be able to replace "da_admin" with "root" and roots mysql password and it would still work exactly the same. (Note system root pass and mysql root pass are probably different)

John
 
Ok, so if I change the root password, it would make sense to change the DA password too for security?

Thanks,
Matt :)
 
Back
Top