Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ CentOS 6.4 compiler installed MySQL 5.6.14     - Spring + Log4j + ActiveMQ remote logging - Analysis of combat (Server)

- After Oracle 11g dataguard failover rebuild the archive logs are not applied to be NO problem (Database)

- How to achieve SSH without password login (Server)

- Android custom title bar (Programming)

- C # get the current screenshot (Programming)

- Tomcat itself through simple movement separation (Server)

- Grading defense against Linux server attacks (Linux)

- Nginx server security configuration (Server)

- How to use Quagga BGP (Border Gateway Protocol) router to filter BGP routing (Linux)

- Getting Started with Linux: Nginx Web Server How to Block Specific User Agents (UA) (Server)

- Linux boot the system does not display a progress bar setting method (Linux)

- iSCSI + multipath achieve DM multipath storage (Server)

- Linux install the Java Runtime Environment and the output Hello World under (CentOS) (Linux)

- Linux operating system Start Tutorial: Xmanager Remote Access Linux graphical interface (Linux)

- Present Situation and Development Trend of firewall products (Linux)

- openSUSE 13.1 / 13.2 installation SoundConverter 2.1.2 (Linux)

- Configuring s3c-linux- appears Unable to find the QT3 installation (Linux)

- Confrontation dragged Library - Web front-end encryption slow (Linux)

- Linux kernel RCU (Read Copy Update) lock Brief (Linux)

- 10 example of the detection memory usage free Linux commands (Linux)

  CentOS 6.4 compiler installed MySQL 5.6.14
  Add Date : 2018-11-21      

Under CentOS 6.4 via yum install MySQL, version 5.1, older, and so want to install from source code version of the high-5.6.14.


One: uninstall the old version

Use the following command to check whether the installed MySQL Server

rpm -qa | grep mysql
Available through the following command to uninstall

rpm -e mysql // delete mode Normal
rpm -e --nodeps mysql // strong delete mode, if you use the above command to delete, suggesting other files rely on, use the delete command can be strong

Two: Install MySQL

Install required packages compiled code

yum -y install make gcc-c ++ cmake bison-devel ncurses-devel
Download MySQL 5.6.14

wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.14.tar.gz
tar xvf mysql-5.6.14.tar.gz
cd mysql-5.6.14
Compile and install

-DCMAKE_INSTALL_PREFIX = / Usr / local / mysql
-DMYSQL_DATADIR = / Usr / local / mysql / data
-DMYSQL_UNIX_ADDR = / Var / lib / mysql / mysql.sock
-DDEFAULT_COLLATION = Utf8_general_ci

make && make install
Compiled parameters can refer http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html.

The whole process takes about 30 minutes long wait ......

Three: Configure MySQL

Setting permissions

Use the following command to check whether mysql users and groups

cat / etc / passwd list of users
cat / etc / group to view the list of user groups
If not created

groupadd mysql
useradd -g mysql mysql
Modify / usr / local / mysql privileges

chown -R mysql: mysql / usr / local / mysql
Modify / usr / local / mysql privileges

Initial Configuration

Enter the installation path

cd / usr / local / mysql
Enter the installation path, perform the initial configuration script to create the system comes with a database and tables

scripts / mysql_install_db --basedir = / usr / local / mysql --datadir = / usr / local / mysql / data --user = mysql
NOTE: When you start the MySQL service will search according to a certain order my.cnf, first looking in the / etc directory, find will search for "$ basedir / my.cnf", in this case, it is / usr / local / mysql / my.cnf, which is the default location of the new version of MySQL configuration file! Note: After CentOS 6.4 operating system minimum installation is complete, in the / etc directory there will be a my.cnf, need this file renamed to other names, such as: /etc/my.cnf.bak, otherwise the MySQL configuration file can interfere with the proper installation of the source code, resulting not start.

Start MySQL

Add the service, copy the script to the init.d directory service, and set the boot

cp support-files / mysql.server /etc/init.d/mysql
chkconfig mysql on
service mysql start - start MySQL

Configuring User

After a successful start MySQL, the default root no password, we need to set the root password.

Before setting, we need to set the PATH, or else can not be directly invoked mysql

Modify / etc / profile file, the file added to the end

PATH = / usr / local / mysql / bin: $ PATH
export PATH
Close the file, run the following command to make the configuration take effect immediately

source / etc / profile
Now, we can enter the terminal directly into the mysql, mysql the environment

Run the following command to change the root password

mysql -uroot
mysql> SET PASSWORD = PASSWORD ( '123456');
To set the root user can remotely access, execution

. Mysql> GRANT ALL PRIVILEGES ON * * TO 'root'@'172.16.%' IDENTIFIED BY 'password' WITH GRANT OPTION;
When the red password for remote access, root user password, and different local.

Configure the firewall

Firewall port 3306 is not turned on by default, to remote access, you need to open this port

Open the / etc / sysconfig / iptables

In the "-A INPUT -m state --state NEW -m tcp -p -dport 22 -j ACCEPT", added with:

-A INPUT m state --state NEW m tcp p dport 3306 j ACCEPT
Then save and close the file, run the following command in the terminal, refresh the firewall configuration:

service iptables restart
OK, everything is configured, you can access your MySQL a ~
- Du and df show disk space usage inconsistent Causes and Treatment (Linux)
- Install Firefox 32 official version of the Linux system (Linux)
- Compile and install Memcached can not find GCC (Programming)
- C ++ Fundamentals study notes (Programming)
- A simple shell script for monitoring in Linux (Linux)
- Linux NFS FTP use (Server)
- Ubuntu Server (Ubuntu 14.04 LTS 64-bit) installation libgdiplus 2.10.9 error solution (Linux)
- MongoDB Installation under CentOS 6.6 (Database)
- DataGuard a hardware issue warnings found (Database)
- When Linux virtual machine to another copy of the operating system, a static IP NAT mode Invalid (Linux)
- mysqldump issue a note (Database)
- Analysis of Java exception (Programming)
- CentOS NAT iptables (Linux)
- How ONLYOFFICE collaborative editing document on Linux (Linux)
- How to use Xmanager Remote Desktop and VNC Log (Linux)
- Python image processing library (PIL) to install and simple to use (Linux)
- Raspberry Pi configuration wireless hotspot (Linux)
- Linux server startup and logon security settings (Linux)
- Archive log file size and redo log file size relationship (Database)
- How to use Linux to download music from Grooveshark (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.