好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁(yè) > 知識(shí)庫(kù) > MySQL5.5 部署的一個(gè)問(wèn)題

MySQL5.5 部署的一個(gè)問(wèn)題

熱門(mén)標(biāo)簽:申請(qǐng)外呼電話線路 湖南人工外呼系統(tǒng)多少錢(qián) 廣東人工電話機(jī)器人 南通自動(dòng)外呼系統(tǒng)軟件 信陽(yáng)穩(wěn)定外呼系統(tǒng)運(yùn)營(yíng)商 石家莊電商外呼系統(tǒng) 百度地圖圖標(biāo)標(biāo)注中心 日照旅游地圖標(biāo)注 芒果電話機(jī)器人自動(dòng)化

MySQL部署

     目前公司部署MySQL是通過(guò)平臺(tái)化操作的,周五的時(shí)候,平臺(tái)暫時(shí)出了點(diǎn)兒?jiǎn)栴},手上有個(gè)需求比較著急,就直接手動(dòng)的部署了一下,由于好長(zhǎng)時(shí)間沒(méi)有部署環(huán)境了,竟然有些手生,這里把部署的步驟以及遇到的問(wèn)題記錄下來(lái),希望對(duì)大家有所幫助。

1、一般情況下,部署有三種常用的方式,第一種是yum的方式,也就是rpm包,第二種是源碼的方式,也就是source code,第三種是二進(jìn)制包,也就是tar.gz格式的包,解壓之后即可,我采用的是第三種方法,部署的MySQL版本是5.5.19版本。

2、首先來(lái)看下錯(cuò)誤吧:

啟動(dòng)服務(wù)的語(yǔ)句:
/usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqld_safe --defaults=/data/mysql_4310/my.cnf 

 [Note] InnoDB: Waiting for purge to start
 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.16-10 started; log sequence number 0
 [Note] Plugin 'FEDERATED' is disabled.
20190621_11:25:41mysqld: Table 'mysql.plugin' doesn't exist
 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
 [ERROR] unknown variable 'thread_concurrency=8'
 [ERROR] Aborting

    可以看到,一共報(bào)了兩個(gè)錯(cuò)誤,第一個(gè)是不能打開(kāi)mysql.plugin這個(gè)表,第二個(gè)錯(cuò)誤是參數(shù)錯(cuò)誤,這個(gè)參數(shù)thread_concurrency無(wú)法識(shí)別。

    對(duì)于第二個(gè)問(wèn)題,可以確認(rèn)是配置文件里面的參數(shù)問(wèn)題,因?yàn)槲沂褂玫氖浅R?guī)的5.7的配置文件,改了幾個(gè)參數(shù),所以這個(gè)參數(shù)很有可能是漏改了,改掉即可。主要是第一個(gè)問(wèn)題,這個(gè)時(shí)候,我進(jìn)行了下面的嘗試。

3、解決方式

嘗試1:嘗試重新啟動(dòng)

使用service mysql start的方法:

[root]# service mysql_4310 start
Starting MySQL.....The server quit without updating PID fil[FAILED]/mysql_4310/tmp/mysql.pid).

發(fā)現(xiàn)服務(wù)還是無(wú)法啟動(dòng),錯(cuò)誤日志的輸出不變。

嘗試2:看到了錯(cuò)誤后面的提示,運(yùn)行mysql_upgrade方法

[root bin]# ./mysql_upgrade --protocol=tcp -P4310 -p
Enter password: 
Looking for 'mysql' as: ./mysql
Looking for 'mysqlcheck' as: ./mysqlcheck
Running 'mysqlcheck' with connection arguments: '--protocol=tcp' '--port=4310' 
./mysqlcheck: Got error: 2003: Can't connect to MySQL server on 'localhost' (111) when trying to connect

看來(lái)還是不行,這個(gè)時(shí)候我嚴(yán)重懷疑是配置文件的問(wèn)題:。

嘗試3:從線上環(huán)境中搞來(lái)了一個(gè)mysql5.5的配置文件,然后重新替換新的配置文件,重新啟動(dòng):

[root@ mysql_4310]# /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqld_safe --defaults-file=/data/mysql_4310/my.cnf  
[1] 63529
[root@ mysql_4310]# 190621 11:51:37 mysqld_safe Logging to '/data/mysql_4310/log/hb30_web_wechat_answers-121_246.err'.
190621 11:51:37 mysqld_safe Starting mysqld daemon with databases from /data/mysql_4310/data
190621 11:51:40 mysqld_safe mysqld from pid file /data/mysql_4310/tmp/mysql.pid ended

查看錯(cuò)誤日志:

查看錯(cuò)誤日志:
[Note] Plugin 'FEDERATED' is disabled.
-5.5.19-linux2.6-x86_64/bin/mysqld: Unknown error 1146
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Using Linux native AIO
InnoDB: Initializing buffer pool, size = 4.0G
InnoDB: Completed initialization of buffer pool
t specified data file /data/mysql_4310/ibdata1 did not exist:
tabase to be created!
 InnoDB: Setting file /data/mysql_4310/ibdata1 size to 1000 MB
 physically writes the file full: wait...
 in MB: 100 200 300 400 500 600 700 800 900 1000
 InnoDB: Data file /data/mysql_4310/ibdata2 did not exist: new to be created
 InnoDB: Setting file /data/mysql_4310/ibdata2 size to 100 MB
 physically writes the file full: wait...
 in MB: 100
og file /data/mysql_4310/innodblog/ib_logfile0 is of different size 0 1073741824 bytes
cified in the .cnf file 0 134217728 bytes!
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Aborting

發(fā)現(xiàn)最先面出現(xiàn)了新的錯(cuò)誤,提示Innodb 初始化函數(shù)返回了錯(cuò)誤,無(wú)法使用innodb存儲(chǔ)引擎。到這里,我開(kāi)始懷疑是不是初始化的時(shí)候,就有錯(cuò)誤,導(dǎo)致服務(wù)不可用,于是想著重新初始化一遍數(shù)據(jù)字典,重新起服務(wù),看看行不行。

嘗試4:重新初始化數(shù)據(jù)字典

   嘗試使用initialize-insecure方法重新初始化,發(fā)現(xiàn)失敗了。

[root mysql_4310]# /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqld
 --initialize-insecure 
--defaults-file=/data/mysql_4310/my.cnf 
--datadir=/data/mysql_4310/data 
--basedir=/usr/local/mysql-5.5.19-linux2.6-x86_64 
[1] 7045



[1]+ Exit 2  /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqld 
--initialize-insecure 
--defaults-file=/data/mysql_4310/my.cnf 
--datadir=/data/mysql_4310/data 
--basedir=/usr/local/mysql-5.5.19-linux2.6-x86_64

錯(cuò)誤日志還是之前的日志,提示mysql.plugin表不存在,除此之外,還多了一行,如下:

[ERROR] /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqld: unknown option '--initialize-insecure'

于是上官方文檔上面查看了--initialize-insecure參數(shù),發(fā)現(xiàn)這個(gè)參數(shù)在mysql5.5版本沒(méi)有,然后5.5版本的是initialize參數(shù),于是換成這個(gè)initialize參數(shù),重新初始化,然后報(bào)錯(cuò)如下:

[root@ ]/usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqld --defaults-file=/data/mysql_4310/my.cnf --datadir=/data/mysql_4310/data --basedir=/usr/local/mysql-5.5.19-linux2.6-x86_64 --initialize 

[1]+ Exit 2     /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqld --defaults-file=/data/mysql_4310/my.cnf --datadir=/data/mysql_4310/data --basedir=/usr/local/mysql-5.5.19-linux2.6-x86_64 --initialize

此時(shí),查看官方文檔,發(fā)現(xiàn)MySQL5.5版本的初始化使用的是mysql_install_db命令而不是mysqld命令,而mysql_install_db這個(gè)工具不在/usr/local/mysql-5.5.19-linux2.6-x86_64/bin目錄中,而在/usr/local/mysql-5.5.19-linux2.6-x86_64/scripts目錄下面,于是通過(guò)cp命令將其拷貝到指定目錄,然后進(jìn)行初始化,如下:

[root@ mysql_4310]# /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysql_install_db 
--defaults-file=/data/mysql_4310/my.cnf 
[root@ mysql_4310]# ll | grep install
[root@ mysql_4310]# /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysql_install_db 
--defaults-file=/data/mysql_4310/my.cnf 
--datadir=/data/mysql_4310/data 
--basedir=/usr/local/mysql-5.5.19-linu
[1] 16365
[root@ mysql_4310]# 
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqladmin -u root -h tk01-devt-mysql-7-200 password 'new-password'

Alternatively you can run:
/usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/mysql-5.5.19-linux2.6-x86_64 ; /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysqld_safe 

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql-5.5.19-linux2.6-x86_64/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/mysql-5.5.19-linux2.6-x86_64/scripts/mysqlbug script!


[1]+ Done     /usr/local/mysql-5.5.19-linux2.6-x86_64/bin/mysql_install_db --defaults-file=/data/mysql_4310/my.cnf --datadir=/data/mysql_4310/data --basedir=/usr/local/mysql-5.5.19-linux2.6-x86_64

結(jié)果成功。

總結(jié)如下:

1、MySQL5.5版本的初始化使用mysql_install_db工具,而不是mysqld工具

2、MySQL5.5版本的初始化使用--initialize參數(shù)

以上就是MySQL5.5 部署的一個(gè)問(wèn)題的詳細(xì)內(nèi)容,更多關(guān)于MySQL 部署的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

您可能感興趣的文章:
  • CentOS8下MySQL 8.0安裝部署的方法
  • Docker 部署 Mysql8.0的方法示例
  • Docker部署Mysql集群的實(shí)現(xiàn)
  • 服務(wù)器Centos部署MySql并連接Navicat過(guò)程詳解
  • CentOS8部署LNMP環(huán)境之編譯安裝mysql8.0.29的教程詳解
  • windows7下mysql8.0.18部署安裝教程圖解
  • Linux遠(yuǎn)程部署MySQL數(shù)據(jù)庫(kù)詳細(xì)步驟
  • Docker部署Django+Mysql+Redis+Gunicorn+Nginx的實(shí)現(xiàn)
  • 詳解使用Docker部署MySQL(數(shù)據(jù)持久化)
  • docker部署mysql 實(shí)現(xiàn)遠(yuǎn)程連接的示例代碼
  • mysql-8.0.17-winx64 部署方法

標(biāo)簽:天津 牡丹江 呼和浩特 惠州 阿里 合肥 公主嶺 沈陽(yáng)

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《MySQL5.5 部署的一個(gè)問(wèn)題》,本文關(guān)鍵詞  MySQL5.5,部署,的,一個(gè),問(wèn)題,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《MySQL5.5 部署的一個(gè)問(wèn)題》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于MySQL5.5 部署的一個(gè)問(wèn)題的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 被草哭| 女朋友一夹一夹的好爽| 妺妺用??夹我的??网站| 精品动漫一区二区三区| 色台湾色综合网站| 60老妇性xxxxhd| 日本全裸美女| 国产在线观看免费| 九色视屏| 男人的??伸到??里视频| 欧美另类videossexo性| 狠狠色狠狠色综合日日91app| 3x3x3x短视频在线看| 好男人www社区在线观看| 一区二区三区毛A片特级破外女| 日本无卡码免费一区二区三区| 公交车上激情小说| 双性美人被强行宫交| 国产麻豆剧看黄在线观看| 91TV国产成人??福利| 露脸超嫩| 打屁股无遮挡网站| 中国黄色网址大全| 91最新地址| 一级黄色a级片| 禁庭尤四姐| 国产又粗又大又硬又长又爽| 91成人无码看片在线观看网址| 啪视频免费| 天蝎女跟天秤男床上合拍吗| 两人某处紧密连接| 好爽?好紧?宝贝坐上来| 日本欧美精品久久久无码人妻VR| 欧美 激情 国产 91 在线| 深夜福利试看| bl高h肉| 做几次下面就会松| PANS内部拍摄花絮| 2021麻豆剧果冻传媒影视| 欧美三级午夜理伦三级| avtt在线|