MySQL出錯問題解決

2021-08-04 22:42:00 字數 1989 閱讀 6890

之前用yum安裝過一次mysql,後來用rpm解除安裝了,還刪除了所有的配置檔案什麼的,總之就是mysql在我的linux中清理得毫!無!痕!跡!然後。。。最近要使用mysql了,於是我又用yum安裝了一遍,但是安裝好後service mysqld start失敗了。。。誰讓我這麼折騰呢!

報錯資訊是這樣的:

/usr/bin/mysqladmin: error while loading shared libraries: libmysqlclient.so.16: cannot open

shared object file: no such file

or directory

cannot check for mysql daemon startup because of mysqladmin failure.

starting mysqld: [failed]

yum remove mysql-libs   #解除安裝

yum install -y mysql-libs #在安裝

於是我右解除安裝重灌了一遍(微笑臉)

沒想到!!!還是啟動失敗。。。

less /var/log/mysqld.log檢視了mysql的log檔案,竟然有報錯。。。

這次報錯是這樣的:

170803

21:57:18 mysqld_safe starting mysqld daemon with databases from /var/lib/mysql

/usr/libexec/mysqld: table 'mysql.plugin' doesn't exist

170803 21:57:18 [error] can't open the mysql.plugin table. please run mysql_upgrade to

create it.

/usr/bin/mysql_install_db--

user=mysql--

datadir=/var/lib/mysql

我在終端輸入了上述語句,mysql終於能正常啟動了!

starting mysqld: [ ok ]

[root@localhost bin]# mysql

welcome to

the mysql monitor. commands end

with ; or \g.

your mysql connection idis2

server version: 5.1

.73 source distribution

oracle is a registered trademark of oracle corporation and/or

itsaffiliates. other names may be trademarks of their respective

owners.

type 'help;' or '\h' for help. type '\c' to clear the current input statement.

mysql> show databases;

+--------------------+

| database |

+--------------------+

| information_schema |

| mysql |

| test |

+--------------------+

3 rows in

set (0.03 sec)

mysql> quit

bye

感謝生活在網際網路這麼發達的二十一世紀~~~~

常見 出錯問題解決

遇見棘手問題 如 在 llvm34 version up 時,需要修改td檔案,大量修改。盡可能先 跳過。這也是在領導督促下,為了盡快解決問題實行的方法。可以極大搞清進度 等解決完其他問題之後,再集中精力解決難題。移植時候,修改 需要 注意牽一髮而動全身 不能只管修改一處,應是,其他涉及的地方都要一...

frida執行出錯超時問題解決

使用frida執行py指令碼時,出現下述問題 traceback most recent call last file test.py line 16,in session device.attach uri file c python python37 lib site packages frid...

MySql 亂碼問題解決

最近連線mysql資料庫的時候,我也遇到了中文亂碼問題 呵呵,很頭疼哦!我用的資料庫是mysql5.0,所以,我先用google,baidu等上網搜了一下解決方案,自己也按著方法反覆測試了一下午,終於解決了我的jsp mysql5.0 tomcat 5.0.29出現的亂碼問題。解決方案如下 1 在d...