MySQL installation (RPM installation mode) and directory structure

Source: Internet
Author: User

For two nights, start with MySQL Basic installation and installation directory structure.


MySQL General 3 mode installs: RPM, binary, source

The simplest is the RPM installation mode, the default automatic configuration is OK. The simplest way to install is now.



Installation:

MySQL official various installation methods:http://dev.mysql.com/doc/refman/5.6/en/linux-installation.html

To see if MySQL is installed:

Rpm-qa|grep-i MySQL


To view the MySQL version provided by Yum:

Yum List | Grepmysql



Install MySQL by default (auto-download RPM package installation) using Yum:

Yum Install-ymysql-server MySQL Mysql-devel



view MySQL installed version:mysql–version (or enter mysql> select version ();)

View enable ports:NETSTAT-NTPL | grep 3306

stop MySQL services: service mysqld stop or/etc/init.d/mysqld stop

start MySQL services: service mysqld start or/etc/init.d/mysqld start

Go to MySQL (input MySQL, enter, first go in without a password):

[[email protected]] #mysql

Set root password (two ways):

Use MySQL;

Set password for [email protected]=password (' yourpassword ');

Update user set Password=password (' YourPassword ') where user= ' root ' and host= ' localhost ';

Flush privileges;

Installation is complete!


directory structure:


View Profile: VI/ETC/MY.CNF




Database Files directory: ll/var/lib/mysql/

Files for storing data and indexes in the IBDATA1:INNODB type

Mysql.sock: Socket file for client-to-server communication

Test: Database Test Directory

MySQL: Database MySQL directory

IB_LOGFILE0: Redo log file (transaction log)

Ib_logfile1: Redo log file (transaction log)



Storage files for tables in a database (3 files per table): Ll/var/lib/mysql/mysql

FRM: Data dictionary file

MYD: Data files

MYI: Index File


MySQL log file: Ll/var/log/mysqld.log

(e.g., initializing information at MySQL startup)




Run status process file:/var/run/mysqld/mysqld.pid

(The MySQL service does not appear until the file is started, and the shutdown disappears)




Descriptor and original configuration files, etc.:/usr/share/mysql (/ETC/MY.CNF can see the configuration file for this directory. cnf)



Help documentation Catalog:Ll/usr/share/doc | grep MySQL



Uninstall method:

Yum Remove mysql-server MySQL mysql-libscompat-mysql

Rm-rf/var/lib/mysql

Find/-name MySQL #查找mysql相关目录, continue to delete the following directory






MySQL installation (RPM installation mode) and directory structure

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.