RedHat 9 and MySQL

Place to discuss Fedora and/or Red Hat
Post Reply
ZiaTioN
administrator
administrator
Posts: 460
Joined: Tue Apr 08, 2003 3:28 pm
Contact:

RedHat 9 and MySQL

Post by ZiaTioN » Tue Oct 28, 2003 12:22 am

Ok I had MySQL on my last install of Redhat 8 and am trying to bring my system back up to par after a complete clean re-install of RH 9. However I am having the same problem I ahd the last time I installed it. It seems the data base creates 2 "root" user account. One at root@llocalhost and another at root@your_system_name. Now when I assign the password doing:

[quote]
/usr/bin/mysqladmin -u root password "new password"
[/qupte]

it appears successfull but when I try to log in as root it errors saying access denied. I try both root account because I remember this happening last time but both accounts error saying wrong password.

Anyone have any ideas? Is there a better free db out there?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Oct 28, 2003 10:19 am

You also need to pass it the host so it knows which ID to change (-h). MySQL IDs consist of two parts, a username and a hostname. Usually the default is "username@localhost" if you don't supply a host.

ZiaTioN
administrator
administrator
Posts: 460
Joined: Tue Apr 08, 2003 3:28 pm
Contact:

Post by ZiaTioN » Tue Oct 28, 2003 11:30 am

Yeah I did that. Was just a litle too lazy last night to provide the neccessary info to be helped, sorry. I changed the default root (root@localhost) to my password then I changed the other root account (root@thegnuage) to the same password. Both were accepted but when I try to log in using both of the following commands it errors and says invalid pass or something.
mysql -u root -p "password"
or
mysql -u root -h thegnuage -p "password"
Like I said both error. Anyway I try to uninstall both the client and the server and re-install to try and re-assign the passwords again but when I reinstalled both the passwords were still there. Does the rpm -e call not remove the password files for MySQL? If not where is it so I can delete it and try again? Last time I actually had to install phpmyadmin to use the gui to log in and that was successfull but this time I tried to install it and it installed but was unsuccessfull in connecting to it's own index.php file.

It gave an error that I do not remember now.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Oct 28, 2003 12:07 pm

How about with "-u root -h localhost"?

ZiaTioN
administrator
administrator
Posts: 460
Joined: Tue Apr 08, 2003 3:28 pm
Contact:

Post by ZiaTioN » Tue Oct 28, 2003 2:59 pm

It uses that account by default so I never tried defining it.
Last edited by ZiaTioN on Tue Oct 28, 2003 6:58 pm, edited 1 time in total.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Oct 28, 2003 3:41 pm

For IDs requiring passwords I usually do this:

Code: Select all

mysql -u username -p
And then it prompts me for a password. If I want to pass the password on the command line I use this syntax:

Code: Select all

mysql -u username --password=password
It doesn't work any other way for me.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Oct 28, 2003 3:41 pm

For IDs requiring passwords I usually do this:

Code: Select all

mysql -u username -p
And then it prompts me for a password. If I want to pass the password on the command line I use this syntax:

Code: Select all

mysql -u username --password=mypassword
It doesn't work any other way for me.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Oct 28, 2003 3:41 pm

For IDs requiring passwords I usually do this:

Code: Select all

mysql -u username -p
And then it prompts me for a password. If I want to pass the password on the command line I use this syntax:

Code: Select all

mysql -u myusername --password=mypassword
It doesn't work any other way for me.

Post Reply