Code Snippet

Just another Code Snippet site

[MySQL] How-To

Install MySQL (new version)on CentOS

Download RPM file from : https://dev.mysql.com/downloads/repo/yum/

Install repo :

sudo yum localinstall platform-and-version-specific-package-name.rpm

Check repo is installed :

yum repolist enabled | grep "mysql.*-community.*"

Install MySQL :

yum install mysql-server

Start/Stop MySQL Server :

service mysql start
service mysql stop
service mysql restart
service mysql status

Connect to MySQL

mysql -u root -p

Select database

 use DATABASE_NAME;

List all tables

show tables;

Repair a table

repair table TABLE_NAME;

MariaDB

, ,


7 thoughts on “[MySQL] How-To

Leave a Reply

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