[CentOS] Re: Request info on managing MySQL
on 9-20-2008 6:40 PM Joe Klemmer spake the following: Good day/night/whatever fellow techies, I've come to a small problem managing mysql on CentOS 4.7 box[1]. When I have done things on mysql on my desktop systems it was always just for personal use so I would be lazy and put everything under the test db so I didn't have to deal with all that security. But I find that I need to put some db's on the production box and could use a little assistance. I can manage with the bulk of the work but since mysql is all pre-configured on RH based systems I don't know where to find the root password or any other tidbits needed to get started. Access to the grant and other admin db's and tables is all I believe I need. Looking through the docs on centos.org didn't reveal anything to me (or I just missed it). I do believe that a default install of Mysql leaves no root password, which you *should* add as soon as you start the service. So the end result of this message is simply can someone point me to the howto use mysql on CentOS/RHEL info. I just need to be able to start adding db's and such. Once there I'm good to go. Thank you in advance, Joe [1] I know, I should upgrade but, as I mentioned, I'm a real lazy guy. 4.7 just came out. So what are you lazy about upgrading? -- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't signature.asc Description: OpenPGP digital signature ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
RE: [CentOS] Re: Request info on managing MySQL
I do believe that a default install of Mysql leaves no root password, which you *should* add as soon as you start the service. So the end result of this message is simply can someone point me to the howto use mysql on CentOS/RHEL info. I just need to be able to start adding db's and such. Once there I'm good to go. Thank you in advance, Joe A standard install of centos and mysql will have 4 items you need to be concerned with. There will be 2 anonymous users databases and 2 roots... You should delete the 2 anaonymous immediately and add a password for the two roots. For the root shell mysql -u root mysql SET PASSWORD FOR 'root'@'localhost' = 'paswrd1'; mysql SET PASSWORD FOR 'root'@'host_name' = 'passwrd2'; While in mysql as root, delete from mysql.user where user=''; (this will get rid of anonymous users. Anonymous will allow people to access your mysql server without a password. Until you add passwords to root, you are also highly insecure. Im too busy trying to figure out sendmail right now...lol ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
RE: [CentOS] Re: Request info on managing MySQL
shell mysql -u root mysql SET PASSWORD FOR 'root'@'localhost' = 'paswrd1'; mysql SET PASSWORD FOR mysql 'root'@'host_name' = 'passwrd2'; Do not know why the mail messed those lines up ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
RE: [CentOS] Re: Request info on managing MySQL
shell mysql -u root mysql SET PASSWORD FOR 'root'@'localhost' = 'paswrd1'; mysql SET PASSWORD FOR mysql 'root'@'host_name' = 'passwrd2'; Host_name is usually localdomain.. But check first with show databases to see.. Sorry for the many emails ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Re: Request info on managing MySQL
On Sep 22, 2008, at 10:27 AM, Bob Hoffman wrote: Host_name is usually localdomain.. But check first with show databases to see.. Use this to make sure: SELECT Host, User FROM mysql.user; --Chris ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos