and stop the server
The mysql. server script can be used to start or stop a server. it is called by using the start or stop parameters:
$ Mysql. server start
$ Mysql. server stop
3. Functions of mysql. server
Before mysql. server starts the server, it changes the directory
mysql // unzip and add the link
[Root @ localhost local] # groupadd mysql // Add a mysql user group
[Root @ localhost local] # useradd-g mysql // Add a mysql user account
[Root @ localhost local] # cd mysql // enter the
Extract
# Cd/usr/local/src/mysql
# Tar zxvf cmake-2.8.8.tar.gz
# Cd cmake-2.8.8
Configuration
#./Configure
Compile
# Make
Install
# Make install
View version
# Cmake-version
4. install Mysql
1) create a user
# Groupadd mysql # Add a mysql Group
# Useradd-g mysql-s/bin/
Mysql master-slave replication technology (test) bitsCN.com
Mysql master-slave replication technology (test)
Start configuration:
Step 1: Create a replication account
Each slave uses a standard MySQL User name and password to connect to the master. The user who performs the copy operation will grantREPLICATIONSLAVE permission.
The username and password are stor
compilation, but this is only the first step of success. configuring many MySQL variables also plays a key role in the normal operation of the server. You can assign values to these variables in a configuration file to make sure they take effect every time you start MySQL. this configuration file is my. cnf.
MySQL has
1. groupadd mysql # create a mysql Group
2. useradd-r-g mysqlmysql # create a mysql user and put the user in the mysql Group
3. passwd mysql # set a password for the mysql user
4. decompress the
MySQL [ERROR] Table 'mysql. user' doesn' t exist, mysql. userexist
A newly installed mysql source code, because the my-default.cnf was not copied to the/etc/my. cnf location, when starting mysql encountered an error that could not
Installing MySQLMySQL in Linux
!! Assume that all installation packages are in the/share Directory. the installation directory is/opt !!
$ Ll/share-Rw-r -- 1 root 129041873 Nov 29 mysql-5.1.54-linux-i686-glibc23.tar.gz
========================================================== ============================================================================ Install MySQL =========================================
/mysql/home/data/
In this way, the MySQL data file is moved to/home/data/mysql.
4. Find the my. cnf configuration file.
If my. for the cnf configuration file, go to/usr/share/mysql/and find *. copy one of the
1. Check the machine configuration. The three main parts are CPU, memory, and hard disk.2. Check MySQL configuration parameters.3. Check the MySQL row status. You can use the mysqlreport tool to view the status.4. View MySQL slow queriesAfter solving the preceding problems in sequence, you can find the program problems.
My. C
Shutdown
3. Move the entire/var/lib/MySQL directory to/home/Data
MV/var/lib/MySQL/home/data/
In this way, the MySQL data file is moved to/home/data/MySQL.
4. Find the my. CNF configuration file.
If my. for the CNF configuration f
The entire process of installing MySql in centos
1. Download MySQL from chinaunix
: Http://download.chinaunix.net/download/0008000/7159.shtml
2. upload to the centos Server
This example is stored in/home/jiangfeng3.
3. Create a MySQL group and user
[Root @ localhost ~] # Groupadd MySQL
[Root @ localhost ~] # Useradd-G
/-- datadir =/usr/local/mysql/data/-- user = mysql
We can also see that the mysql database has been initialized successfully. The system also shows how to start mysql, marked as 5 in the figure. Figure 6 shows how to change the password of the root user.
Ii. mysql Database
MySQL master-slave replication, mysql master-slave
Original article published on cu:
Reference:
This article involves the principle of MySQL master-slave replication and a simple verification of master-slave replication.I. MySQL master-slave replication Principle 1. Master-slave replication architecture Diagram
Three
' '-- with-embedded-server'' -- enable-local-infile'
Make make install
Cd ../
Groupaddmysql
Useradd-s/sbin/nologin-M-g mysql
Cp/usr/local/mysql/share/mysql/my-medium.cnf/etc/my. cnf
Sed-I's/skip-locking/skip-external-locking/g'/etc/my. cnf
/Usr/local/
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.