In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Task on May 23rd
11.1 introduction to LAMP architecture
11.2 introduction to MySQL and MariaDB
11.3 MySQL 11.4 Compact 11.5 installation
Introduction to LAMP Architecture
From now on, it aims at the content of the actual work.
L Linux
An Apache (HTTPD)
M Mysql
P PHP
The three roles can be on the same machine or separately. For httpd and php to be together, the database can be accessed remotely or distributed.
MySQL_MariaDB introduction
Mariadb
MariaDB database management system is a branch of MySQL, which is mainly maintained by the open source community and licensed by GPL. One of the reasons for developing this branch is that after Oracle acquired MySQL, there is a potential risk of shutting down MySQL, so the community uses a branching approach to avoid this risk.
The goal of MariaDB is to be fully compatible with MySQL, including API and the command line, making it an easy replacement for MySQL. In terms of the storage engine, version 10.0.9 has used XtraDB (code name Aria) instead of MySQL's InnoDB.
MariaDB was developed by Michael Vidnius, the founder of MySQL, who had earlier sold his company, MySQL AB, to SUN for $1 billion, and then MySQL was owned by Oracle as SUN was acquired by Oracle. The name MariaDB comes from the name of Maria (English: Maria), daughter of Michael Vidnius.
There are two kinds of mariadb ax tx in the latest (2018.05) version. Here is a simple difference.
Install MYSQL
There are three main ways of installation.
Rpm . Yum installation. The disadvantage is that it is difficult to define the path. Installed in usr/local by default
Source code installation. Config make make install . Mysql is cmake, not make.
Binary compiler-free. Is equivalent to before the release, first on a linux server to do a compilation, after the compilation will be compiled back into a directory and then packaged and compressed and released. The advantage is that it doesn't take a lot of effort to compile and use it directly. You can put it directly under the specified directory you need.
The next demonstration is the third way to install.
Download the package. First of all, go to the download directory, use/local/src.
When downloading, you should distinguish between platforms and download the corresponding 32 Universe 64-bit package. Check what platform your system is and use uname-a
Then download the corresponding binary package
Http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
two。 Decompression
3. Rename the extracted directory and move it to the / usr/local/mysql directory at the same time
4. After entering mysql/, create a mysql user and a data/ directory-store mysql data, data directory
5 initialize the mysql library, specify what the user of mysql is, here we are the user mysql, and then specify the directory of the data is / data
. / scripts/mysql_install_db-user=mysql-datadir=/data/mysql
There was a mistake.
Here is an idea of how to find missing packages or modules, that is, yum looks up yum list | grep perl | grep-I dumper
If you are not sure, you can install all of the above. Actually, what you need to install is yum install-y perl-Data-Dumper.
Re-execute after installation
. / scripts/mysql_install_db-user=mysql-datadir=/data/mysql
Success
6. Initialization is complete, and then you need to copy the configuration file and startup script.
Template configuration file: mysql/support-files/my-default.cnf needs to be copied to / etc/my.cnf my.cnf is the name of the configuration file for mysql, and under etc, if you use another name or place it in another location, you need to specify it at startup.
At this time, you will find that you already have this configuration file in the etc directory. In fact, it doesn't matter, just change it to what you need. You can also use rpm-qf to find out where the file came from.
Then vim / etc/my.cnf modifies the configuration
Startup script: there are several places to edit after the cp mysql/support-files/mysql.server / etc/init.d/mysqld copy
Basedir is used to specify the mysql program directory
Datadir is used to define where the data is stored.
Then give the permissions of the configuration file to 755
Add it to the list of system services and go to chkconfig-add mysqld and check it out and start it automatically the next time you open the opportunity.
There are several ways to start a service
Service mysqld start
/ etc/init.d/mysqld start
View the process
See what the listening port is.
There is another way to start the command line
/ usr/local/mysql/bin/mysqld_safe-- defaults-file=/etc/my.cnf-- user=mysql-- datadir=/data/mysql & put the operation in the background
Killall mysqld shuts down the service because it was started on the command line, not the service. The advantage of killall is that it stops the write-read operation first and kills the process after the current write-read operation is completed.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.