1. 程式人生 > >SuSE11安裝MySQL5.1.73:RPM安裝方式(超簡單入門級安裝)

SuSE11安裝MySQL5.1.73:RPM安裝方式(超簡單入門級安裝)

databases ade 環境 bsp run schema input comm evel

註:此安裝過程只有關鍵步驟,僅適合入門學習使用


一、 環境準備

64位操作系統,SuSE版本11sp3。(註:kingtry是我的主機名)

kingtry:~ # uname -a
Linux kingtry 3.0.76-0.11-default #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990) x86_64 x86_64 x86_64 GNU/Linux

kingtry:~ # cat /etc/SuSE-release 
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3


二、

軟件準備

MySQL-client-community-5.1.73-1.sles11.x86_64.rpm

MySQL-server-community-5.1.73-1.sles11.x86_64.rpm


三、 安裝過程

kingtry:~ # rpm -ivh MySQL-server-community-5.1.73-1.sles11.x86_64.rpm MySQL-client-community-5.1.73-1.sles11.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:MySQL-client-community ########################################### [ 50%]
   2:MySQL-server-community ########################################### [100%]
insserv: Service network is missed in the runlevels 4 to use service mysql
mysql                     0:off  1:off  2:on   3:on   4:on   5:on   6:off
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 kingtry password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
Starting MySQL..                                                      done
Giving mysqld 2 seconds to start


四、安裝完成

超級簡單的安裝過程,只需上面一個命令即可,且安裝完之後服務也自動啟動了。

當前版本root密碼為空

kingtry:~ # mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.73-community MySQL Community Server (GPL)
Copyright (c) 2000, 2013, 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> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.00 sec)
mysql>




SuSE11安裝MySQL5.1.73:RPM安裝方式(超簡單入門級安裝)