Debian's MySQL

Source: Internet
Author: User
Tags anonymous

Debian9 installing any version of MySQL

Debian installation and use of MySQL

DEBIAN8 installing MySQL (MariaDB)

Source code compilation and installation MySQL5.6.12 detailed procedures in Fedora and Redhat and CentOS

Mysql-server and Mysql-client

Mysql-server and Mysql-client are the two tools for the DBMS that target different operands.

Server is the integration of the DBMS to the physical level, including a series of mechanisms and processing methods for storing data;

The client is a user-oriented DBMS that provides a range of tools for use by users, including typically written SQL that is compiled within the server to manipulate physical data.

Mysql-server is the service side, that is, you do not install the server, the client has no object to operate, like, you bought a watermelon knife, but did not buy watermelon .... Cut watermelon There are many tools, watermelon knife is just one of

Introducing several mainstream MySQL graphical clients, navicat,phpmyadmin

When the RPM package is installed, MySQL is automatically installed as a system service , so you can start and stop MySQL using the following command

Start MySQL

/etc/init.d/mysql start or service MySQL start

Related catalogue

Tool Program (Mysqladmin mysqldump, etc.) in/usr/bin directory---ls/usr/bin/mysql*
Server program/usr/sbin/mysqld
Data Catalog/var/lib/mysql
Error log files, binary log files, and process files are written in the/var/lib/mysql directory
Mysql.server command and configuration file/usr/share/mysql

Configuration

[Email protected]:/etc/mysql# ls
CONF.D Debian-start MARIADB.CONF.D My.cnf.fallback
DEBIAN.CNF mariadb.cnf my.cnf

Configuration Instructions

Description in/etc/my.cnf file

# The MariaDB configuration file
#
# The Mariadb/mysql tools read configuration files in the following order:
# 1. "/ETC/MYSQL/MARIADB.CNF" (this file) to set global defaults,
# 2. "/ETC/MYSQL/CONF.D/*.CNF" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set mariadb-only options.
# 4. "~/.my.cnf" to set user-specific options.

View service Current Status Systemctl command

Systemctl Status Mysql.service

Main configuration

sudo mysql_secure_installation

-Enter current password to root (enter for none): (No password for the first time)
-Set root password? [y/n] Y (set root password)
-Remove anonymous users? [y/n] Y (remove anonymous account)
-Disallow root login remotely? [y/n] Y (disable root telnet)
-Remove test database and access to it? [y/n] Y (delete test database and access rights)
-Reload privilege tables now? [y/n] Y (refresh permissions)

show databases; Display Database

Show tables; Displaying tables in a database

describe table name; Show the structure of the data table:

Create database table name; Build Database

/etc/init.d/mysql start

Service MySQL stop shutdown MySQL Services

/usr/bin/mysqladmin-u root-p shutdown Stop

Service MySQL restart restart MySQL services

/var/lib/mysql mysql default data file storage directory

Debian's MySQL

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.