成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

CentOS 安裝 MYSQL

tianlai / 1917人閱讀

摘要:版本系統(tǒng)內(nèi)核下載下載頁面選擇版本卸載舊版本查看是否安裝了數(shù)據(jù)庫安裝配置執(zhí)行命令啟動確定確定確定查看服務(wù)關(guān)閉關(guān)閉啟用啟用啟用啟用關(guān)閉設(shè)置開機自啟動查看版本連接安裝配置完成

CentOS版本

cat /etc/redhat-release
>> CentOS release 5.4 (Final)

系統(tǒng)內(nèi)核

uname -a
>> Linux test33x.ops.xxx.net 2.6.18-164.el5xen #1 SMP Thu Sep 3 04:03:03 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

MYSQL下載

下載頁面

Select Platform
>> Red Hat Enterprise Linux / Oracle Linux

選擇x86_64版本

MySQL-client-5.5.38-1.rhel5.x86_64.rpm
MySQL-server-5.5.38-1.rhel5.x86_64.rpm
MySQL-shared-5.5.38-1.rhel5.x86_64.rpm

卸載舊版本

yum remove mysql mysql-server mysql-libs
rm -rf /var/lib/mysql
rm /etc/my.cnf

rpm -qa|grep mysql //查看是否安裝了mysql數(shù)據(jù)庫
>> rpm -e mysql --nodeps

MYSQL安裝

rpm -ivh MySQL-client-5.5.38-1.rhel5.x86_64.rpm
rpm -ivh MySQL-server-5.5.38-1.rhel5.x86_64.rpm
rpm -ivh MySQL-shared-5.5.38-1.rhel5.x86_64.rpm

配置

【執(zhí)行命令】 /usr/bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we"ll need the current
password for the root user.  If you"ve just installed MySQL, and
you haven"t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
You already have a root password set, so you can safely answer "n".
Change the root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from "localhost".  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MySQL comes with a database named "test" that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done!  If you"ve completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!

啟動MYSQL

service mysql start

>> Starting MySQL.                                            [確定]

service mysql status

>> MySQL running (32239)                                      [確定]

service mysql stop

>> Shutting down MySQL.                                       [確定]

查看服務(wù)

chkconfig --list | grep mysql

>> mysql            0:關(guān)閉    1:關(guān)閉    2:啟用    3:啟用    4:啟用    5:啟用    6:關(guān)閉

chkconfig mysql on  //設(shè)置開機自啟動

查看版本

mysql -V

>> mysql  Ver 14.14 Distrib 5.5.38, for Linux (x86_64) using readline 5.1

連接MYSQL

mysql -u root -p

Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.5.38 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type "help;" or "h" for help. Type "c" to clear the current input statement.

mysql> 

安裝配置完成!

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://systransis.cn/yun/17361.html

相關(guān)文章

  • 啊里云centos7.6編譯安裝NGINX+PHP7+MariaDB+MEMCACHED

    摘要:安裝前準備修改默認主機名稱安裝依賴庫刪除系統(tǒng)默認數(shù)據(jù)庫配置文件查詢刪除確認卸載系統(tǒng)自帶查詢刪除安裝數(shù)據(jù)庫下載安裝包解壓創(chuàng)建數(shù)據(jù)庫安裝目錄,數(shù)據(jù)存放目錄, 安裝前準備 修改默認主機名稱 [root@iZuf60c5bxd15kr9gycvv6Z ~]# hostnamectl set-hostname centos [root@iZuf60c5bxd15kr9gycvv6Z ~]# re...

    yuanxin 評論0 收藏0
  • linux安裝mysql

    摘要:設(shè)置的密碼必須符合長度,且必須含有數(shù)字,小寫或大寫字母,特殊字符。可以看到只允許訪問更新用戶表強制刷新權(quán)限再次查看用戶表。查看端口監(jiān)聽狀態(tài),修改配置文件這里可以看到表示所有均可訪問。1.準備① 檢測系統(tǒng)是否自帶安裝 MySQLrpm -qa | grep mysql如有,類似mysql-libs-5.1.52-1.el6_0.1.x86_64那可以選擇進行卸載:rpm -e mysql-li...

    Tecode 評論0 收藏0

發(fā)表評論

0條評論

tianlai

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<