View installed mysql database: rpm -qa | grep mysql
rpm -e command or rpm -e --nodeps command to uninstall
rpm -e mysql
rpm -e --nodeps mysql
Installation process
1. yum list | grep mysql View the downloadable version of the mysql database provided on yum
2. yum install -y mysql-server mysql mysql-devel install mysql
3. rpm -qi mysql-server to check the version of mysql-server just installed
4. service mysqld start start mysql
5.service mysqld restart restart mysql
6.chkconfig --list|grep mysqld Check whether the mysql server starts automatically
7.chkconfig mysqld on set startup
8./usr/bin/mysqladmin -u root password 'root' The root account sets the initial password to root
9.mysql -u root -p root login
Authorize remote connection permissions;
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
flush privileges ;
10.netstat -anp |grep mysql to view linux listening mysql port
Main configuration
/etc/my.cnf is the main configuration file for mysql
/var/lib/mysql Storage directory for mysql database files
/var/log/ mysql log storage directory