安裝mysql5 6報錯問題統計點

2022-05-29 16:57:13 字數 2241 閱讀 9356

報錯1(

su進入

mysql

屬組時報錯):

[root@dbserver ~]# su - mysql

last login: thu aug 31 17:20:03 cst 2017 on pts/1

su: warning: cannot change directory to /home/mysql: no such file or directory

-bash-4.2$ exit

解決方法:

[root@dbserver ~]# cd /home

[root@dbserver home]# ls

xiniu

[root@dbserver home]# mkdir /home/mysql

[root@dbserver home]# chmod 755 /home/mysql

[root@dbserver home]# ls

mysql   xiniu

[root@dbserver home]# cp -a /etc/skel/. /home/mysql/

[root@dbserver home]# su - mysql

last login: thu aug 31 17:20:58 cst 2017 on pts/1

[mysql@dbserver ~]$ id

uid=987(mysql) gid=1003(mysql) 組

=1003(mysql)

環境=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

報錯2(啟動報錯

):

[root@localhost mysql]# /etc/init.d/mysql start

starting mysql. error! the server quit without updating pid file (/usr/local/mysql/data/localhost.localdomain.pid).

解決方法:

#rm -rf /usr/local/mysql/data

# chown -r mysql.mysql .

# cd  /usr/local/mysql

# scripts/mysql_install_db

# /usr/local/mysql/bin/mysqld_safe --user=root &

# ls    /usr/local/mysql/data/

# /etc/init.d/mysqld start

starting mysql success!   ##啟動成功

報錯3(啟動報錯

):

/etc/init.d/mysql: line 256: my_print_defaults: command not found

/etc/init.d/mysql: line 276: cd: /usr/local/mysql: no such file or directory

starting mysql error! couldn't find mysql server (/usr/local/mysql/bin/mysqld_safe)

解決辦法:

編輯/etc/my.cnf 檔案,因為缺少

basedir

和datadir

兩個路徑,在

[mysqld] 

新增上即可

#vim /etc/my.cnf

[mysqld]

...........

...........

basedir=/usr/local/mysql          ##修改成自己安裝路徑

datadir=/usr/local/mysql/data   ##修改成自己安裝路徑

儲存退出,然後重新啟動就可以.

[root@localhost mysql]# vim /etc/my.cnf

[root@localhost mysql]# service mysql start

starting mysql........................................ success!

編譯mysql5 6 編譯安裝mysql5 6

mysqlwget tar zxvf mysql 5.6.33.tar.gz tar zxvf cmake 2.8.5.tar.gz cd cmake 2.8.5 安裝編譯工具.bootstrap prefix usr local cmake sudo gmake sudo gmake instal...

mysql安裝 安裝MySQL5 6

027 08 2015 下午 12 樓主 這個mysql 的安裝過程是有問題的,可能是配置引數,我在初始化的時候報 2015 08 27 12 18 24 9957 note innodb the innodb memory heap is disabled 2015 08 27 12 18 24 ...

mysql5 6配置 Mysql5 6安裝與配置

mysql5.6安裝與配置 進入安裝頁 單擊第一項 install mysql products 一般勾上 skip the check for updates 跳過更新檢查。4 mysql模式 和 路徑 設定 一般安裝mysql作為普通伺服器使用 生產環境 所以選擇 server only 路徑自...