久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

MySQL安裝常見報錯怎么處理

169次閱讀
沒有評論

共計 4520 個字符,預計需要花費 12 分鐘才能閱讀完成。

本篇內容介紹了“MySQL 安裝常見報錯怎么處理”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓丸趣 TV 小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!

1. 無法啟動處理,錯誤 1053

Windows 無法啟動 Mysql 服務 錯誤 1053:服務沒有及時響應啟動或控制請求

1.1 結束進程

處理方法:
1、在命令行中敲入 tasklist 查看進程
2、根據進程名殺死進程
taskkill /f /t /im 進程名稱

1.2 更改網絡服務

Server2012 位置

其他 win7 及 win10 操作系統

1)、計算機 - 管理 - 本地用戶和組 - 組 雙擊,效果圖如下:

(2)、雙擊 Administrators,并點擊添加, 再點擊高級

(3)、把 NETWORK SERVICE 添加到 Administrators 組

1.3 刪除服務

sc delete mysql57303307

此處記住,重新安裝 Mysql 就可以,2 步操作重新執行(刪除原有 Mysql 文件,全部重新安裝即可)
還有個坑就是,如果還是啟動不了,記得要開啟這個服務 Windows Installer
Windows Installer 是一種通用的軟件發布方式,用于安裝軟件。
默認情況下,該服務是手動啟動,需要進入服務管理中開啟。
右擊開始——運行——輸入“services.msc”——Windows Installer——啟動

2.Winwods 安裝初始化報錯

MySQL 安裝常見報錯怎么處理

Beginning configuration step: Writing configuration fileSaving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration fileBeginning configuration step: Updating Windows Firewall rules
Adding a Windows Firewall rule for MySQL80 on port 3306.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name= Port 3306  protocol=TCP localport=3306 dir=in action=allow
Successfully added the Windows Firewall rule.
Adding a Windows Firewall rule for MySQL80 on port 33060.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name= Port 33060  protocol=TCP localport=33060 dir=in action=allow
Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules
Beginning configuration step: Adjusting Windows serviceAttempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new serviceNew service added
Ended configuration step: Adjusting Windows serviceBeginning configuration step: Initializing database (may take a long time)Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.24...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file= C:\ProgramData\MySQL\MySQL Server 8.0\my.ini  --console --initialize-insecure=on --lower-case-table-names=1...
Process for mysqld, with ID 2572, was run successfully and exited with code -1073741515.
Failed to start process for MySQL Server 8.0.24.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)

MySQL 安裝常見報錯怎么處理
安裝 VC_redist.x86 即可執行既 OK

MySQL 安裝常見報錯怎么處理
輸入 gpedit.msc,打開策略管理

MySQL 安裝常見報錯怎么處理
啟用證書更新后正常

由于部分系統鏡像構建較早,且不能進行系統更新,需要安裝系統補丁包才能完成 vc++ 安裝

4.Centos 環境 rpm 初始化 MySQL 報錯

Centos7 默認提供的 openssl 版本是 1.0.2 的,某些 php 擴展或者其他軟件依賴 1.1 以上版本,如果過低的話就會報錯
libssl.so.1.1: cannot open shared object file: No such file or directory
也有執行 openssl version 時報錯和上面一致,這是由于 openssl 庫的位置不正確或未安裝 1.1 以上版本的問題
想要升級 openssl 版本則需要手動進行編譯,報錯解決方式很簡單,安裝正確即可,
下面說一下我以 Centos7 為例,說一下具體的編譯安裝步驟

–openssl 版本確認
[root@jeames ~]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
–編譯 openssl
tar -xvf openssl-1.1.1g.tar.gz
cd openssl-1.1.1g
./config shared –openssldir=/usr/local/openssl –prefix=/usr/local/openssl
make make install

MySQL 安裝常見報錯怎么處理

–配置
編譯完成后,使用 openssl version,來查看一下當前 openssl 版本號時,
你會發現還是 1.0.2,所以這里需要做一些額外的配置工作。
[root@jeames openssl-1.1.1g]# more /etc/ld.so.conf
include ld.so.conf.d/*.conf
[root@jeames openssl-1.1.1g]# echo“/usr/local/lib64/”/etc/ld.so.conf
[root@jeames openssl-1.1.1g]# ldconfig
再次使用 openssl version 驗證版本就可以了,
如果不行,可以嘗試下面的方式,
依次執行(先備份老版本,再從新版本安裝位置創建軟連接)
mv /usr/bin/openssl /usr/bin/openssl.old
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
echo“/usr/local/openssl/lib”/etc/ld.so.conf
ldconfig -v

4.MySQL8 安裝后無法登陸

第一辦法:

1. 用命令編輯 /etc/my.cnf 配置文件,即:vim /etc/my.cnf 或者 vi /etc/my.cnf
2. 在 [mysqld] 下添加 skip-grant-tables,然后保存并退出
3. 重啟 mysql 服務:service mysqld restart
4. 更改 root 用戶名
重啟以后,執行 mysql 命令進入 mysql 命令行
5. 修改 root 用戶密碼,此處注意,有時候會報不允許修改,先 flush privileges 再執行即可
update mysql.user set authentication_string=password(‘root’) where user=‘root’; –5.7 版本
flush privileges;
6. 把 /etc/my.cnf 中的 skip-grant-tables 注釋掉,然后重啟 mysql,即:service mysqld restart
好了,下面就可以用 root 新的密碼登錄了!

MySQL 安裝常見報錯怎么處理
第二種辦法:

在 mysql8 系統下,適用如下方法(全路徑)
G:\mysql-8.0.23-winx64\bin\mysqld –datadir=G:\mysql-8.0.23-winx64\data80323308 –console –skip-grant-tables –shared-memory

MySQL 安裝常見報錯怎么處理

然后再開一個窗口,執行下面命令
cd G:\mysql-8.0.23-winx64\bin

MySQL 安裝常見報錯怎么處理

mysql select user,host,authentication_string from mysql.user;
mysql delete from mysql.user where user=‘root’;
mysql flush privileges; – 記得刷新哈,如果提示無法創建
mysql create user root@‘%’identified with mysql_native_password by‘root’;
mysql grant all on . to root@‘%’with grant option;
mysql flush privileges;
mysql drop user‘root’@‘localhost’;
mysql flush privileges;
mysql create user root@‘localhost’identified with mysql_native_password by‘root’;
mysql grant all on . to root@‘localhost’with grant option;
mysql flush privileges;

“MySQL 安裝常見報錯怎么處理”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注丸趣 TV 網站,丸趣 TV 小編將為大家輸出更多高質量的實用文章!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-13發表,共計4520字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 峨眉山市| 临潭县| 大田县| 青铜峡市| 台安县| 佛冈县| 奉化市| 天长市| 左权县| 金华市| 嘉荫县| 天台县| 府谷县| 泗阳县| 丰原市| 余庆县| 封丘县| 清流县| 兴安县| 文安县| 滕州市| 罗江县| 股票| 灌南县| 蓝山县| 林甸县| 曲阜市| 苍溪县| 清镇市| 南江县| 府谷县| 阳西县| 武宁县| 长岭县| 肥东县| 双流县| 西平县| 孙吴县| 宣化县| 黑河市| 霸州市|