下文內(nèi)容主要給大家?guī)韑inux系統(tǒng)應該如何安裝MySQL5.7.21版本數(shù)據(jù)庫,所講到的知識,與書籍略有不同,都是創(chuàng)新互聯(lián)專業(yè)技術(shù)人員在與用戶接觸過程中,總結(jié)出來的,具有一定的經(jīng)驗分享價值,希望給廣大讀者帶來幫助。
創(chuàng)新互聯(lián)主要從事網(wǎng)頁設計、PC網(wǎng)站建設(電腦版網(wǎng)站建設)、wap網(wǎng)站建設(手機版網(wǎng)站建設)、成都響應式網(wǎng)站建設、程序開發(fā)、網(wǎng)站優(yōu)化、微網(wǎng)站、微信小程序開發(fā)等,憑借多年來在互聯(lián)網(wǎng)的打拼,我們在互聯(lián)網(wǎng)網(wǎng)站建設行業(yè)積累了豐富的網(wǎng)站設計制作、成都網(wǎng)站設計、網(wǎng)站設計、網(wǎng)絡營銷經(jīng)驗,集策劃、開發(fā)、設計、營銷、管理等多方位專業(yè)化運作于一體。
mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz
tar -zxvf mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz
mv mysql-5.7.21-linux-glibc2.12-x86_64 mysql
5.7與以前的版本初始化有所不同
mkdir /ghca/mysql/data
mkdir /ghca/mysql/log
安裝numactl yum install numactl
./mysqld --initialize --user=mysql --basedir=/ghca/mysql/ --datadir=/ghca/mysql/data
2018-03-29T06:44:18.994928Z 0 [Warning] [MY-011070] Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it is deprecated and will be removed in a future release.
2018-03-29T06:44:18.995070Z 0 [System] [MY-010116] /ghca/mysql/bin/mysqld (mysqld 8.0.4-rc) starting as process 23100 ...
2018-03-29T06:44:23.952948Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed.
2018-03-29T06:44:24.389231Z 5 [Note] [MY-010454] A temporary password is generated for root@localhost: Y%7923Moc7dd 這是root密碼
復制mysql.server到/etc/init.d/
cp support-files/mysql.server /etc/init.d/mysql
修改配置文件
cat my.cnf
[client]
port = 3306
socket =/ghca/mysql/mysql.sock
[mysqld]
port = 3306
user = mysql
character-set-server = utf8
#default_storage_engine = innodb
log_timestamps = SYSTEM
socket =/ghca/mysql/mysql.sock
basedir =/ghca/mysql/
datadir =/ghca/mysql/data
pid-file =/ghca/mysql/data/mysql.pid
max_connections = 1000
max_connect_errors = 1000
table_open_cache = 1024
max_allowed_packet = 128M
open_files_limit = 65535
#####====================================[innodb]==============================
innodb_buffer_pool_size = 1024M
innodb_file_per_table = 1
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_purge_threads = 2
innodb_flush_log_at_trx_commit = 1
innodb_log_file_size = 512M
innodb_log_files_in_group = 2
innodb_log_buffer_size = 16M
innodb_max_dirty_pages_pct = 80
innodb_lock_wait_timeout = 30
innodb_data_file_path=ibdata1:1024M:autoextend
#####====================================[log]==============================
log_error =/ghca/mysql/log/mysql-error.log
slow_query_log = 1
long_query_time = 1
slow_query_log_file =/ghca/mysql/log/mysql-slow.log
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
chkconfig --add mysql
chkconfig mysql on
service mysql start
1、停止mysql
2、./mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3、登錄mysql
mysql
mysql> update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
mysql> flush privileges;
service mysql start
Starting MySQL. ERROR! The server quit without updating PID file (/ghca/mysql/data/mysql.pid).
修改my.cnf文件權(quán)限
chmod 775 /ghca/mysql/my.cnf
service mysql start
my_print_defaults: [Warning] World-writable config file '/ghca/mysql/my.cnf' is ignored.
Starting MySQL.my_print_defaults: [Warning] World-writable config file '/ghca/mysql/my.cnf' is ignored.
my_print_defaults: [Warning] World-writable config file '/ghca/mysql/my.cnf' is ignored.
SUCCESS!
對于以上關(guān)于linux系統(tǒng)應該如何安裝mysql5.7.21版本數(shù)據(jù)庫,如果大家還有更多需要了解的可以持續(xù)關(guān)注我們創(chuàng)新互聯(lián)的行業(yè)推新,如需獲取專業(yè)解答,可在官網(wǎng)聯(lián)系售前售后的,希望該文章可給大家?guī)硪欢ǖ闹R更新。
網(wǎng)頁標題:linux系統(tǒng)應該如何安裝mysql5.7.21版本數(shù)據(jù)庫
文章網(wǎng)址:http://muchs.cn/article32/piejsc.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營銷、面包屑導航、微信小程序、App設計、云服務器、軟件開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)