CentOS7-Mysql5.7配置(二)

2.10.2 Starting the Server

<dl id="tocdetail-0" style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14.256px; vertical-align: baseline; background: transparent; line-height: 1.6;">

<dt style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14.256px; vertical-align: baseline; background: transparent;">2.10.2.1 Troubleshooting Problems Starting the MySQL Server</dt>

</dl>

This section describes how start the server on Unix and Unix-like systems. (For Windows, see Section 2.3.5.5, “Starting the Server for the First Time”.) For some suggested commands that you can use to test whether the server is accessible and working properly, see Section 2.10.3, “Testing the Server”.

Start the MySQL server like this if your installation includes mysqld_safe:

shell> bin/mysqld_safe --user=mysql &

Note

For Linux systems on which MySQL is installed using RPM packages, server startup and shutdown is managed using systemd rather than mysqld_safe, and mysqld_safe is not installed. See Section 2.5.10, “Managing MySQL Server with systemd”.

Start the server like this if your installation includes systemd support:

shell> systemctl start mysqld

Substitute the appropriate service name if it differs from mysqld (for example, mysql on SLES systems).

It is important that the MySQL server be run using an unprivileged (non-root) login account. To ensure this, runmysqld_safe as root and include the --user option as shown. Otherwise, you should execute the program while logged in as mysql, in which case you can omit the --user option from the command.

For further instructions for running MySQL as an unprivileged user, see Section 6.1.5, “How to Run MySQL as a Normal User”.

If the command fails immediately and prints mysqld ended, look for information in the error log (which by default is the *host_name*.err file in the data directory).

If the server is unable to access the data directory it starts or read the grant tables in the mysql database, it writes a message to its error log. Such problems can occur if you neglected to create the grant tables by initializing the data directory before proceeding to this step, or if you ran the command that initializes the data directory without the --user option. Remove the data directory and run the command with the --user option.

If you have other problems starting the server, see Section 2.10.2.1, “Troubleshooting Problems Starting the MySQL Server”. For more information about mysqld_safe, see Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. For more information about systemd support, see Section 2.5.10, “Managing MySQL Server with systemd”.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌朋譬,老刑警劉巖线婚,帶你破解...
    沈念sama閱讀 217,542評(píng)論 6 504
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件骗村,死亡現(xiàn)場(chǎng)離奇詭異姐帚,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)捐腿,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,822評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來柿顶,“玉大人茄袖,你說我怎么就攤上這事∴揖猓” “怎么了宪祥?”我有些...
    開封第一講書人閱讀 163,912評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長家乘。 經(jīng)常有香客問我蝗羊,道長,這世上最難降的妖魔是什么烤低? 我笑而不...
    開封第一講書人閱讀 58,449評(píng)論 1 293
  • 正文 為了忘掉前任肘交,我火速辦了婚禮,結(jié)果婚禮上扑馁,老公的妹妹穿的比我還像新娘涯呻。我一直安慰自己凉驻,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,500評(píng)論 6 392
  • 文/花漫 我一把揭開白布复罐。 她就那樣靜靜地躺著涝登,像睡著了一般。 火紅的嫁衣襯著肌膚如雪效诅。 梳的紋絲不亂的頭發(fā)上胀滚,一...
    開封第一講書人閱讀 51,370評(píng)論 1 302
  • 那天,我揣著相機(jī)與錄音乱投,去河邊找鬼咽笼。 笑死,一個(gè)胖子當(dāng)著我的面吹牛戚炫,可吹牛的內(nèi)容都是我干的剑刑。 我是一名探鬼主播,決...
    沈念sama閱讀 40,193評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼双肤,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼施掏!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起茅糜,我...
    開封第一講書人閱讀 39,074評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤七芭,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后蔑赘,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體狸驳,經(jīng)...
    沈念sama閱讀 45,505評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,722評(píng)論 3 335
  • 正文 我和宋清朗相戀三年米死,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了锌历。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,841評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡峦筒,死狀恐怖究西,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情物喷,我是刑警寧澤卤材,帶...
    沈念sama閱讀 35,569評(píng)論 5 345
  • 正文 年R本政府宣布勤庐,位于F島的核電站蔬捷,受9級(jí)特大地震影響马篮,放射性物質(zhì)發(fā)生泄漏榕订。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,168評(píng)論 3 328
  • 文/蒙蒙 一殿如、第九天 我趴在偏房一處隱蔽的房頂上張望叉弦。 院中可真熱鬧摹恨,春花似錦、人聲如沸卓练。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,783評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽襟企。三九已至嘱么,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間顽悼,已是汗流浹背曼振。 一陣腳步聲響...
    開封第一講書人閱讀 32,918評(píng)論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留蔚龙,地道東北人冰评。 一個(gè)月前我還...
    沈念sama閱讀 47,962評(píng)論 2 370
  • 正文 我出身青樓,卻偏偏與公主長得像府蛇,于是被迫代替她去往敵國和親集索。 傳聞我的和親對(duì)象是個(gè)殘疾皇子屿愚,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,781評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容