I installed centos 6 as a webserver. It installed mysql. However, I guess I need mysql-server for me to use it for php and my website. I installed that. I am unable to give root a password and can go no further. I have tried mysql-secure-installation and I just get stuck at errors and no progression. I have tried mysqladmin -u root password <password> and the accompanying one that includes the hostname. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I am unable to use mysql with php or do anything at all with it. It was strange it installed mysql but I guess this version is different and needs more packages to work within a webserver. all attempts at using mysql without mysql-server installed just results in nothing being found (like mysqld) and the like...so I had to install the server. In 5.x I could just use mysqladmin and add roots, delete anonymous, etc. However, this time I am stuck. I uninstalled mysql-server, the perl thing that comes with it, and mysql itself, then reinstalled them, that got me no where. gotta be something I am missing here. thanks for listening.
Bob Hoffman
2012-Feb-03 04:15 UTC
[CentOS] new mysql installation, kinda stuck- sorta solved
after a few yum remove / reinstalls I got this working by doing the following... (not fully set up yet, just the very first step) #yum install mysql mysql-server #service mysqld start #chkconfig --levels 235 mysqld on #mysql --user=root -p (this is not the syntax I would have normaly used, but only this seemed to get past the hump) <entered a password when it asked me too> <ctrl-c out of mysql> #mysql-secure-installation it asked for password and I entered the new password. It then said, okay, and asked if I wanted to change the password, I did. (wanted a tough one). then I finished the mysql-secure-installation questions. Although secure-installation is set up to just hit enter on a new install as no password has yet been added, that results in an error 100% of the time. Using a different syntax mysql -u root password <new password> resulted in complete failure when trying the mysql-secure-installation. Trying to by pass the secure installation and what I would assume was normal for adding the two root password commands (the one above and one with the hostname and password) resulted in failure (guess it is a new version with new stuff). I am happy that mysql has finally automated that little 'wide open' mysql server thing. It was not smooth to do this though. With a fresh install of mysql and the server the secureinstallation script should have took <enter> when I had no password. It does not (or not in my case)...wheee.