Linux環境下的MySQL在線安裝

記錄一下有關於MySQL安裝的過程,畢竟用到的命令太多,有時候真的記不住!!!!

  • 安裝

    yum install mysql-server

  • 查看mysql的位置、狀態

    #位置
    which mysql
    #狀態
    service mysqld status
    
  • 啓動mysql

    sudo service mysqld start

  • 設置root用戶的密碼

    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h bigdata-pro01.bigDAta.com password 'new-password'
    
    
  • 使用上述的密碼進入mysql

    mysql -uroot -p123456
    有關於Windows環境下安裝MySQL的過程,可以查看
    mysql5.5免安裝版配置教程

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章