Posted On April 1, 2019

Install MySQL on CentOS 5.2

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Install MySQL on CentOS 5.2
To install MySQL, we do this:
yum install mysql mysql-devel mysql-server

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start



Now check that networking is enabled. Run
netstat -tap | grep mysql

It should show a line like this:
[root@server1 ~]# netstat -tap | grep mysql
tcp        0      0 *:mysql                     *:*                         LISTEN      2584/mysqld

If it does not, edit /etc/my.cnf and comment out the option skip-networking:
vi /etc/my.cnf
[...]

#skip-networking

[...]
and restart your MySQL server:
/etc/init.d/mysqld restart

Run:
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.ocgold.com -u root password yourrootsqlpassword

to set a password for the user root (otherwise anybody can access your MySQL database!).

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

A Few Todos while Securing Apache Server

- Install mod_security - Set expose_php = Off in php.ini - Set SecResponseBodyAccess Off in…

How To Create a 64-bit Linux Bootable USB Thumb Drive with 32-bit UEFI Compatibility

Part 1: Making the USB Booting Thumb Drive Download Rufus: https://rufus.ie/ Download Linux ISO -…

How to Move Virtualbox Guest VMs to Different Hosts

Connect to Source Host and copy files to NAS: ssh webadmin@server01 vboxmanage list running vms…
Other project: DragonCoin.com