MYSQL server installation on Cent OS.
- Install mysql package on server.
yum -y install mysql mysql-server
- MySQL starts automatically whenever the system boots.
chkconfig –levels 35 mysqld on [apply]
chkconfig –list mysqld [check]
- start MySQL service
/etc/init.d/mysqld start
- Set passwords for the MySQL root account:
mysql_secure_installation
[Press Enter whenever asking & configure root password]
- Understand MySQL access
mysql -u root -p —->ENTER MYSQL PASSWORD
mysql> SHOW VARIABLES LIKE “%version%”; —–> CHECK VERSION
mysql> SHOW DATABASES; ———–> CHECK DATABASE
mysql> CREATE DATABASE kesaridb; ————–>CREATE DATABASE
mysql> use kesaridb; ————-> USE DATABASE<NAME>
mysql> create table mysql_auth ( ———->CREATE TABLE UNDER DATABASE
-> username char(25) not null,
-> passwd char(32),
-> groups char(25),
-> primary key (username)
-> );
mysql> SHOW TABLES; ——-> CHECK TABLE CREATE OR NOT
mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘password$’ WITH GRANT OPTION; —-> GIVE PRIVALAGE FOR ROOT USER
mysql> SELECT user,host,password FROM mysql.user; ———> CHECK USER PASSWORD
- access mysql through Telnet (e.g. RemoteIP Address)
telnet [IP Address& port number]
Thnaks…….