国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
Source code installation mysql-5.6.30 and mysql maintenance
Overview:
Text:
1: Uninstall the old version
2: Install MySQL
Install the packages needed to compile the code
Download MySQL 5.6.14
Compile and install
Three: Configure MySQL
Set permissions
Initial configuration
啟動MySQL
配置用戶
配置防火墻
Home Backend Development PHP Tutorial Source code installation mysql-5.6.30 and mysql maintenance_PHP tutorial

Source code installation mysql-5.6.30 and mysql maintenance_PHP tutorial

Jul 12, 2016 am 08:51 AM
android

Source code installation mysql-5.6.30 and mysql maintenance

Overview:

The MySQL installed through yum under CentOS 6.4 is version 5.1, which is relatively old, so I just want to install the higher version 5.6.30 through the source code.

Text:

1: Uninstall the old version

Use the following command to check whether MySQL Server is installed

rpm -qa | grep mysql

If yes, use the following command Command to uninstall

rpm -e mysql   //普通刪除模式rpm -e --nodeps mysql    // 強力刪除模式,如果使用上面命令刪除時,提示有依賴的其它文件,則用該命令可以對其進行強力刪除

2: Install MySQL

Install the packages needed to compile the 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.30.tar.gztar xvf mysql-5.6.14.tar.gzcd mysql-5.6.14

Compile and install

cmake \-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \-DMYSQL_DATADIR=/usr/local/mysql/data \-DSYSCONFDIR=/etc \-DWITH_MYISAM_STORAGE_ENGINE=1 \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DWITH_MEMORY_STORAGE_ENGINE=1 \-DWITH_READLINE=1 \-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \-DMYSQL_TCP_PORT=3306 \-DENABLED_LOCAL_INFILE=1 \-DWITH_PARTITION_STORAGE_ENGINE=1 \-DEXTRA_CHARSETS=all \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_cimake && make install

For compilation parameters, please refer to http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html.

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

Three: Configure MySQL

Set permissions

Use the following command to check if there is a mysql user and user group

cat /etc/passwd 查看用戶列表cat /etc/group  查看用戶組列表

Create if there is none

groupadd mysqluseradd -g mysql mysql

Modify /usr/local/mysql permissions

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

Modify /usr/local/mysql permissions

Initial configuration

Enter the installation path

cd /usr/local/mysql

Enter the installation path, execute the initialization configuration script, and create the database and tables that come with the system

scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql

Note: When starting the MySQL service, my.cnf will be searched in a certain order, first in the /etc directory, if not found, it will search for "$basedir/my.cnf", in this case /usr/ local/mysql/my.cnf, this is the default location of the configuration file of the new version of MySQL!

注意:在CentOS 6.4版操作系統(tǒng)的最小安裝完成后,在/etc目錄下會存在一個my.cnf,需要將此文件更名為其他的名字,如:/etc/my.cnf.bak,否則,該文件會干擾源碼安裝的MySQL的正確配置,造成無法啟動。

在使用"yum update"更新系統(tǒng)后,需要檢查下/etc目錄下是否會多出一個my.cnf,如果多出,將它重命名成別的。否則,MySQL將使用這個配置文件啟動,可能造成無法正常啟動等問題。

啟動MySQL

添加服務,拷貝服務腳本到init.d目錄,并設置開機啟動

cp support-files/mysql.server /etc/init.d/mysqlchkconfig mysql onservice mysql start  --啟動MySQL

配置用戶

MySQL啟動成功后,root默認沒有密碼,我們需要設置root密碼。

設置之前,我們需要先設置PATH,要不不能直接調用mysql

修改/etc/profile文件,在文件末尾添加

PATH=/usr/local/mysql/bin:$PATHexport PATH

關閉文件,運行下面的命令,讓配置立即生效

source /etc/profile

現(xiàn)在,我們可以在終端內直接輸入mysql進入,mysql的環(huán)境了

執(zhí)行下面的命令修改root密碼

mysql -uroot  mysql> SET PASSWORD = PASSWORD('123456');

若要設置root用戶可以遠程訪問,執(zhí)行

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.16.%' IDENTIFIED BY 'password' WITH GRANT OPTION;

紅色的password為遠程訪問時,root用戶的密碼,可以和本地不同。

配置防火墻

防火墻的3306端口默認沒有開啟,若要遠程訪問,需要開啟這個端口

打開/etc/sysconfig/iptables

在“-A INPUT –m state --state NEW –m tcp –p –dport 22 –j ACCEPT”,下添加:

-A INPUT -m state --state NEW -m tcp -p -dport 3306 -j ACCEPT

然后保存,并關閉該文件,在終端內運行下面的命令,刷新防火墻配置:

service iptables restart
OK,一切配置完畢,你可以訪問你的MySQL了~

------------------------------------------------------------------------------------------------------------------

Added on December 2, 2014:

CentOS 7 uses Firewalld as the firewall by default, so after modifying iptables, it will not work at all after restarting the system.

The method of adding a port in Firewalld is as follows:

firewall-cmd --zone=public --add-port=3306/tcp--permanent

firewall-cmd --reload


---------------------------------- -------------------------------------------------- ----------------------------
1: Add user
INSERT INTO mysql.user(Host,User,Password) values("%","dev",password("yihen382465"));
If you want to log in on any computer, replace localhost with %; you can also replace localhost with any IP, which means only allowed Log in with this IP;
If ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value, set the sql_mode in the configuration file to NO_ENGINE_SUBSTITUTION, and then restart mysql

2: Create a database
CREATE DATABASE distributorDEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

3: Grant the database
grant all privileges on distributor.* to dev@localhost identified by '123456';

4: Refresh privileges
flush privileges;

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1129196.htmlTechArticleSource code installation mysql-5.6.30 and mysql maintenance overview: MySQL installed through yum under CentOS 6.4 is version 5.1 , is relatively old, so I want to install the higher version 5.6.30 through the source code. Text: 1:...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades Sep 12, 2024 pm 12:23 PM

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

Samsung Galaxy S25 Ultra leaks in first render images with rumoured design changes revealed Samsung Galaxy S25 Ultra leaks in first render images with rumoured design changes revealed Sep 11, 2024 am 06:37 AM

OnLeaks has now partnered with Android Headlines to provide a first look at the Galaxy S25 Ultra, a few days after a failed attempt to generate upwards of $4,000 from his X (formerly Twitter) followers. For context, the render images embedded below h

IFA 2024 | TCL\'s NXTPAPER 14 won\'t match the Galaxy Tab S10 Ultra in performance, but it nearly matches it in size IFA 2024 | TCL\'s NXTPAPER 14 won\'t match the Galaxy Tab S10 Ultra in performance, but it nearly matches it in size Sep 07, 2024 am 06:35 AM

Alongside announcing two new smartphones, TCL has also announced a new Android tablet called the NXTPAPER 14, and its massive screen size is one of its selling points. The NXTPAPER 14 features version 3.0 of TCL's signature brand of matte LCD panels

Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69 mm body Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69 mm body Sep 07, 2024 am 06:39 AM

The Vivo Y300 Pro just got fully revealed, and it's one of the slimmest mid-range Android phones with a large battery. To be exact, the smartphone is only 7.69 mm thick but features a 6,500 mAh battery. This is the same capacity as the recently launc

Samsung Galaxy S24 FE billed to launch for less than expected in four colours and two memory options Samsung Galaxy S24 FE billed to launch for less than expected in four colours and two memory options Sep 12, 2024 pm 09:21 PM

Samsung has not offered any hints yet about when it will update its Fan Edition (FE) smartphone series. As it stands, the Galaxy S23 FE remains the company's most recent edition, having been presented at the start of October 2023. However, plenty of

iQOO Z9 Turbo Plus: Reservations begin for the potentially beefed-up series flagship iQOO Z9 Turbo Plus: Reservations begin for the potentially beefed-up series flagship Sep 10, 2024 am 06:45 AM

OnePlus'sister brand iQOO has a 2023-4 product cycle that might be nearlyover; nevertheless, the brand has declared that it is not done with itsZ9series just yet. Its final, and possibly highest-end,Turbo+variant has just beenannouncedas predicted. T

New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades Sep 12, 2024 pm 12:22 PM

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

Xiaomi Redmi Note 14 Pro Plus arrives as first Qualcomm Snapdragon 7s Gen 3 smartphone with Light Hunter 800 camera Xiaomi Redmi Note 14 Pro Plus arrives as first Qualcomm Snapdragon 7s Gen 3 smartphone with Light Hunter 800 camera Sep 27, 2024 am 06:23 AM

The Redmi Note 14 Pro Plus is now official as a direct successor to last year'sRedmi Note 13 Pro Plus(curr. $375 on Amazon). As expected, the Redmi Note 14 Pro Plus heads up the Redmi Note 14 series alongside theRedmi Note 14and Redmi Note 14 Pro. Li

See all articles