1. 程式人生 > >centos下徹底刪除MYSQL 和重新安裝MYSQL的解壓縮版

centos下徹底刪除MYSQL 和重新安裝MYSQL的解壓縮版



[[email protected] mysql5.7]# bin/mysql_install_db --user=mysql --basedir=/home/software/mysql/mysql5.7/ --datadir=/home/software/mysql/mysql5.7/data/
2017-05-02 22:04:13 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2017-05-02 22:04:17 [WARNING] The bootstrap log isn't empty:
2017-05-02 22:04:17 [WARNING] 2017-05-02T14:04:13.971980Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead

[
[email protected]
mysql5.7]# cp -a ./support-files/my-default.cnf  /etc/my.cnf
[[email protected] mysql5.7]# cp -a ./support-files//mysql.server /etc/init.d/mysqld
[[email protected] mysql5.7]# cd bin
[[email protected] bin]# ./mysqld_safe --user=mysql&
[1] 4687
[[email protected] bin]# ./mysqld_safe: line 522: /usr/local/mysql/data/mysqld_safe.pid: No such file or directory
awk: (FILENAME=- FNR=1) warning: error writing standard output (Broken pipe)
170502 22:07:37 mysqld_safe Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
touch: cannot touch ‘/usr/local/mysql/data/localhost.localdomain.err’: No such file or directory
chmod: cannot access ‘/usr/local/mysql/data/localhost.localdomain.err’: No such file or directory
touch: cannot touch ‘/usr/local/mysql/data/localhost.localdomain.err’: No such file or directory
chown: cannot access ‘/usr/local/mysql/data/localhost.localdomain.err’: No such file or directory
170502 22:07:37 mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information
./mysqld_safe: line 130: /usr/local/mysql/data/localhost.localdomain.err: No such file or directory
^C
[1]+  Exit 1                  ./mysqld_safe --user=mysql

 # 執行上面命令時報錯:是因為我使用的是預設的配置檔案預設的路徑,而我的安裝目錄不是在預設路徑/usr/local/mysql下,所以還要執行下面的命令:

[
[email protected]
etc]# less my.cnf
[[email protected] etc]# vi my.cnf
[[email protected] etc]# vi init.d/mysqld
[[email protected] etc]# mkdir -p /usr/local/mysql/bin
[[email protected] etc]# ln -s /home/software/mysql/mysql5.7/bin/mysqld /usr/local/mysql/bin/mysqld
[[email protected] bin]# ./mysqld_safe --user=mysql&
[1] 4904
[
[email protected]
bin]# 170502 22:14:42 mysqld_safe Logging to '/home/software/mysql/mysql5.7/data/localhost.localdomain.err'.
170502 22:14:42 mysqld_safe Starting mysqld daemon with databases from /home/software/mysql/mysql5.7/data
[[email protected] bin]# /etc/init.d/mysqld restart
Shutting down MySQL..170502 22:15:53 mysqld_safe mysqld from pid file /home/software/mysql/mysql5.7/data/localhost.localdomain.pid ended
 SUCCESS!
Starting MySQL. SUCCESS!
[1]+  Done                    ./mysqld_safe --user=mysql
# 把mysql設定為開機啟動,啟動層次是圖形介面和命令列模式
[[email protected] bin]# chkconfig --level 35 mysqld on

相關推薦

centos徹底刪除MYSQL 重新安裝MYSQL壓縮

[[email protected] mysql5.7]# bin/mysql_install_db --user=mysql --basedir=/home/software/mysql/mysql5.7/ --datadir=/home/software/mysql/mysql5.7/data

CentOS徹底刪除SELinux的方法

SELinux(Security-Enhanced Linux)安全增強式Linux,是一種強制訪問控制(mandatory access control)的實現。這這種控制下,linux有很多的操作是

Centos徹底刪除oracle

1.用oracle使用者登入如果要再次安裝, 最好先做一些備份工作。包括使用者的登入指令碼,資料庫自動啟動關閉的指令碼,和Listener自動啟動的指令碼。要是有可能連建立資料庫的指令碼也儲存下來2.使用SQL*PLUS停止資料庫[[email protected

yum 徹底刪除nodejs,重新安裝

博文 https registry 官網 版權 lib oca 原創 conf 第一步 用自帶的包管理先刪除一次 yum remove nodejs npm -y1手動刪除殘留 進入 /usr/local/lib 刪除所有 node 和 node_modules文件夾進

如何安裝MySQl解除安裝MySQL

如何解除安裝MySQL: //如果電腦沒有安裝過MySQL,那麼直接忽略這一步 如果安裝過MySQL,那麼一定解除安裝乾淨,MySQL這個東西比較噁心,想要解除安裝乾淨比較麻煩.需要以下: 1.控制面板 –> 程式和功能 –> 解除安裝MySQ

MySQL 5.6 for Windows 壓縮下載與配置安裝

下載:MySQL 5.6 for Windows 下載地址     根據自己的開發環境選擇相應版本。先對.zip檔案進行解壓縮到合適位置,解壓縮之後其實MySQL就可以使用了,但是要進行配置。配置:配置系統環境變數:        我的電腦->屬性->高階->

MySQL 5.6 for Windows 壓縮配置安裝

安裝MySQL資料庫中遇到許多問題,折騰了一上午,開始安裝msi格式的,安裝過程那個starting service 步驟不能啟動,網上找了很多解決方法,但都沒有解決,於是改安裝zip版本的,參照 h

Windows10系統徹底刪除解除安裝MySQL,並安裝Mysql 5.7

參考了好多篇文章,加上自己的實踐,總結如下 首先是解除安裝 1》停止MySQL服務 進入計算進管理,將MySQL服務停止。 2》解除安裝mysql server 控制面板\所有控制面板項\程式和功能,將mysql server解除安裝掉。 3》將MySQL安裝目錄下的M

Windows10系統徹底刪除解除安裝MySQL

本文介紹,在Windows10系統下,如何徹底刪除解除安裝MySQL。。。 1》停止MySQL服務 開始-》所有應用-》Windows管理工具-》服務,將MySQL服務停止。 2》解除安裝mysql server 控制面板\所有控制面板項\程式和功能,將mysql server解除安裝掉。

Ubuntu徹底解除安裝mysql重新安裝

1、刪除 mysql 1 sudo apt-get autoremove --purge mysql-server-5.02 sudo apt-get remove mysql-server3 sudo apt-get autoremove mysql-server4 su

MySQL之——CentOS徹底解除安裝MySQL

1、檢視MySQL是否安裝  方式1: [[email protected] usr]# yum list installed mysql* Loaded plugins: fastestmirror Loading mirror speeds from ca

ubuntu mysql | 徹底解除安裝mysql並且重新安裝[親自實踐,絕對有效]

轉自:http://www.jianshu.com/p/c76b31df5d09 首先刪除mysql: sudo apt-get remove mysql-* 然後清理殘留的資料 dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

ubuntu徹底解除安裝mysql並且重新安裝

sudo apt-get remove mysql-* 1 然後清理殘留的資料 dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P 1 它會跳出一個對話方塊,你選擇yes就好了  然後安裝mysql sud

ubuntu16.04 徹底解除安裝mysql重新安裝

首先刪除mysql sudo apt-get remove mysql-* dpkg -l |grep ^rc|awk ‘{print $2}’ |sudo xargs dpkg -P 然後安裝mysql 可以直接預設安裝 sudo apt-get install mysql-clien

Linux重新安裝MySql後出現'MySQL Daemon failed to start‘解決方法

在 CentOS 6.4上之前安裝過Mysql資料庫,想升級到較新的版本所以就重新升級了一下資料庫。可是重新安裝後執行:service mysqld start 重啟資料庫總是會出現如下提示: MyS

用mis文件重新安裝MYSQL卡在最後一步,卡在Starting Server,刪除註冊表無效的解決方案

div user tar 註冊 分享 c盤 9.png ini 環境變量 前言 由於mis安裝包默認把MYSQL安裝在C盤,所以我想要重新安裝到其他盤,然而卸載後重新安裝就卡在了Starting Server.. 之後在網上查找了刪除註冊表的解決方案,然而還是卡在了

重新安裝mysql時,徹底解除安裝之前的MySQL

如果想重新安裝mysql,必須把之前安裝好的MySQL進行解除安裝 關閉mysql的服務程序和工作管理員裡面相關的 到控制面板哪裡把mysql進行刪除 到c盤或者其他盤的Program Files(根據安裝時候選擇的安裝路徑)下的MySQL檔案進行刪除 需要

刪除mysql重新安裝

sudo rm /var/lib/mysql/ -R sudo rm /etc/mysql/ -R sudo apt-get autoremove mysql* --purge sudo apt-g

如何徹底刪除linux上yum 安裝mysql

轉自:http://www.jb51.net/article/97516.htm 一、使用以下命令檢視當前安裝mysql情況,查詢以前是否裝有mysql ? 1 rpm -qa|grep -i mysql 可以看到如下圖的所示:

CentosSphinx的下載與編譯安裝

onf total osi training art exe .gz clas com 官方下載地址 http://sphinxsearch.com/downloads/release/ 百度雲下載地址 https://pan.baidu.com/s/1gfmPbd5