Installing MySQL in Linux, is not difficult to do. This article is a step by step guide on how to do it:
- In CentOS you might not have perl-DBI installed:
yum install perl-DBI
- Download and install the packages listed below (from www.mysql.com package download)
rpm -ivh MySQL-server-XXXXXX.rpm rpm -ivh MySQL-client-XXXXXX.rpm rpm -ivh MySQL-devel-XXXXXX.rpm
- Set root passwords
mysqladmin -u root password 'new-password' mysqladmin -u root -h <computer name>.<localdomain> password 'new-password' -p
- Install the GUI tools (also downloaded from www.mysql.com GUI download)
tar xvfz mysql-gui-tools-XXXXXX.tar.gz rpm -ivh mysql-gui-tools-XXXXXX.rpm rpm -ivh mysql-administrator-XXXXXXX.rpm rpm -ivh mysql-query-browser-XXXXX.rpm
- The administrator tool is started with: mysql-administrator
- The query browswer tool is started with: mysql-query-browser
- CentOS should already have a ‘mysql’ service entry in the ‘Service Configuration’ app. Make sure it’s set to autostart and stop (that its checked-marked).
- To add users to a MySQL DB that can access the server remotely use this sql command logged as root:
GRANT ALL PRIVILEGES ON *.* TO 'mertech'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
Tags: Linux
