How to change hostname in MySQL database

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
1,088
I initially learned of my problem by not being able to log in from the outside on 3306 getting the error: "not allowed to connect to this MySQL server" and not being able to log into MySQL on the command line without getting the error: "Access denied for user 'da_admin'@'localhost' (using password: YES)"

Looking in /usr/local/directadmin/scripts/setup.txt, I noticed the old hostname. Then I tried it by adding the old host name to the login sting: mysql [email protected] and it logged in.

How do I fix this?

Thanks!
 
I rebooted and it logs in [email protected]. But it also logins in if I used -uda_admin@localhost or -uda_admin@localhos or -uda_admin@. However when I use simply -uda_admin, I receive the error: ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using password: YES) What's up with that?
 
Last edited:
Once logged into MySQL and I do a SHOW DATABASES, I do not see the databases on the server. It seems as though I'm not logged in right else I would see the databases on the server.

Thanks!
 
Back
Top