On 10/06/2014 03:27 PM, Reindl Harald wrote:
Am 06.10.2014 um 21:24 schrieb Robert Moskowitz:
On 10/06/2014 03:08 PM, Reindl Harald wrote:
Am 06.10.2014 um 21:01 schrieb Robert Moskowitz:
I am doing an install of a mysql system, and decided that I needed to change some things like host name. So I have to go back to square one with the mysql setup, but can't find any instructions for this. I TRIED:
mysql_install_db
And it did SOMETHING, but
mysqladmin -u root password 'mypass'
failed with:
mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)'
I tried 'yum reinstall mysql' and that did not help
why should "yum reinstall" change anything?
Some apps reinit there data on reinstalls. Some don't. Don't know until you try.
no they don't
/var/lib/appname/ is never part of the package otherwise update swould touch/damage your data
the daemon specific data are below /var&/lib/mysql as for any other software they live below /var/ib/appname
no command ever will reset them besides rm -rf /var/lib/mysql/ but what has that all to do with change the hostname?
Don't know what changing the hostname did or does not do. I am digging into various info to figure out what to delete or rebuild to get back to pristine mysql. I can understand why this should not be easy - for someone to remove all of your mysql data, but it should be possible...
if you have no data:
- stop the service
- rm -rf /var/lib/mysqld/*
Looks like the files:
/var/lib/mysql/mysql/user.MYD /var/lib/mysql/mysql/user.MYI /var/lib/mysql/mysql/user.frm
have the goo that has to go.
- start the service
- you have a virgin setup
and as always read some docs http://dev.mysql.com/doc/refman/5.5/en/privilege-system.html
What you want to do it seems is change the hostname for access of some users. Although, if it is local access, they should have access to localhost and it doesn't matter which hostname the machine has. Also, initially, you have to set the root password.
Almost everyone uses PHPMyAdmin to administer MySQL in this area (apart from the root password). Either by editing the mysql.* databases directly (which I wouldn't recommend if you have no experience) or in the user administration. After that you have to flush the credentials or simply restart MySQL.
As John and others said, the hostname of the machine doesn't matter. It's not necessary to reinstall MySQL as this won't "fix" it, anyway.
Kai